Dynamic chart

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

  2. You can add additional series to a chart by specifying new series keys in your payload.

    1. Any newly added series will be created as a copy of the last existing series.

  3. If your template contains more series than the provided data, the extra series will be automatically removed.

  4. Axes that no longer contain any data after this adjustment will also be deleted.

Reference: chart

Download: input.zip | output.pptx


{
  "presentation": {
    "template": "template.pptx",
    "slides": [
      {
        "slide_index": 0,
        "shapes": [
          {
            "name": "Chart 1",
            "title": "Monthly Revenue in 2024 (in millions)",
            "data": [
              [
                "Revenue"
              ],
              [
                "January", 
                "February", 
                "March", 
                "April", 
                "May", 
                "June"
              ],
              [
                  4.8
              ],
              [
                  5.2
              ],
              [
                  6.1
              ],
              [
                  5.9
              ],
              [
                  7.0
              ],
              [
                  8.3
              ]
            ]
          }
        ]
      }
    ]
  }
}

Last updated

Was this helpful?