How to :: create double charts and master slave in code mode

Double charts configuration

When configuring a slide it is possible to insert two charts on the same story.

{
  level: 3
  title: ""
  parent_id:
  id:
  datasets:
    my_dataset:
      id: "my_dataset"
      query:
        domain: ""
    my_dataset_1:
      id: "my_dataset_1"
      query:
        domain: ""
  charts: [
    {
      dataset: "my_dataset"
      chartType: ""
    }
    {
      dataset: "my_dataset_1"
      chartType: ""
    }
  ]
}

Master slave configuration

📖 Learn more about master slave from this tutorial

📝 In this example, I’m configuring a master linechart, on the date column.
id:
level: 3
parent_id:
title: ""
datasets:
  my_dataset:
    id: "my_dataset"
    query:
      domain: "my_master_dataset"
    date:
      selector: "date"
      format: "%Y-%m-%d"
  my_dataset_1:
    id: "my_dataset_1"
    query:
      domain: "my_slave_dataset"
    date:
      selector: "date"
      format: "%Y-%m-%d"
charts: [
  {
    dataset: "my_dataset"
    value: ""
    date: ""
    chartType: "linechart"
    crossfilter:
      on: "date"
      datasets: [
        "my_dataset_1"
      ]
  }
  {
    chartType: "horizontal-barchart"
    dataset: "my_dataset_1"
    label: ""
    value: ""
  }
]