> 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/insert-data.md).

# Insert data

1. Select the shape by `name` you want to modify. See [here](/knowledge-base/finding-shape-names.md) to find shape names.
2. Use `data` to update a chart’s data range
3. Under `data`:&#x20;
   * 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: [chart](/json-template-syntax/shapes/chart.md#data-object)

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

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

<figure><img src="/files/OY4fnsNj3fF65BMc6LwL" alt=""><figcaption></figcaption></figure>

***

<figure><img src="/files/CdSultLFgwab9a3jspbf" 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": "Average Annual Precipitations",
            "data": [
              [
                "North",
                "South",
                "East",
                "West"
              ],
              [
                "January",
                "February",
                "March"
              ],
              [
                11,
                15,
                4,
                7
              ],
              [
                25,
                60,
                77,
                30
              ],
              [
                40,
                50,
                65,
                44
              ]
            ]
          }
        ]
      }
    ]
  }
}
```

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