> For the complete documentation index, see [llms.txt](https://docs.powerpointgeneratorapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.powerpointgeneratorapi.com/examples/chart/dynamic-chart.md).

# Dynamic chart

1. Select the shape by `name` you want to modify. See [here](/knowledge-base/finding-shape-names.md) 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](/json-template-syntax/shapes/chart.md)

Download: [input.zip](https://drive.google.com/uc?export=download\&id=1_hLWEznVkokPtJRgNs_kSR1_sUcIVDyV) | [output.pptx](https://drive.google.com/uc?export=download\&id=1JNA98ejRIgUEN7X4WGpTNcG9zUneeg-g)

{% columns %}
{% column width="41.66666666666667%" %}

<figure><img src="/files/5nBmzUZKhMsCvy2Tvr5i" alt=""><figcaption></figcaption></figure>

***

<figure><img src="/files/WK3oHMQ6yP5uP4p7R4Z4" alt=""><figcaption></figcaption></figure>
{% endcolumn %}

{% column width="58.33333333333333%" %}
{% code lineNumbers="true" %}

```json
{
  "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
              ]
            ]
          }
        ]
      }
    ]
  }
}

```

{% endcode %}
{% endcolumn %}
{% endcolumns %}
