Dynamic chart

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

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

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

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

  • 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?