Insert data

  1. Select the shape by name you want to modify. See here to find shape names.

  2. Use data to update a chart’s data range

  3. Under data:

    • First array: Contains the series names (legend labels).

    • Second array: Contains the category labels (X-axis items).

    • Third array and onwards: Each subsequent array contains the data values corresponding to a specific category. The order of these arrays matches the order of the categories defined in the second array.

Reference: Data Object

Download: input.zip | output.pptx


{
  "presentation": {
    "template": "template.pptx",
    "slides": [
      {
        "slide_index": 0,
        "shapes": [
          {
            "name": "Chart 1",
            "title": "Average Annual Precipitations",
            "data": [
              [
                "North",
                "South",
                "East",
                "West"
              ],
              [
                "January",
                "February",
                "March"
              ],
              [
                11,
                15,
                4,
                7
              ],
              [
                25,
                60,
                77,
                30
              ],
              [
                40,
                50,
                65,
                44
              ]
            ]
          }
        ]
      }
    ]
  }
}

Last updated

Was this helpful?