# Chart styling

1. Specify the chart title under `title` if necessary.
2. Under `settings`, you can:
   1. Insert chart legend related settings (see [adjust-chart-legend](https://docs.powerpointgeneratorapi.com/examples/chart/adjust-chart-legend "mention") section).
   2. Configure chart legend options such as **`chartShowLegend`**, **`chartLegendPosition`**, **`chartLegendFontColor`**, and **`isChartLegendBold`**.
   3. Define the desired chart title using **`title`**.
   4. Set the font and size with **`chartFont`** and **`chartFontSize`**
   5. Optionally, adjust the data label color using **`chartDataLabelColor`** (e.g., `"Red"`, `"Black"`, `"Green"` color names only).

Reference: [chart](https://docs.powerpointgeneratorapi.com/json-template-syntax/shapes/chart "mention")

Download: [input.zip](https://drive.google.com/uc?export=download\&id=1-5Hrk14ysqqqAfjdKhVTyuhQhWX5Vgrx) | [output.pptx](https://drive.google.com/uc?export=download\&id=1omjFFDnN_diClmoaMy5udwXvQ8vL-anf)

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

<figure><img src="https://1155212587-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgoqdluo05I2RXHZpTr-887967055%2Fuploads%2Fdy3etkTh785HAdUOc04q%2Ftemplate.png?alt=media&#x26;token=9baba1ff-31ba-4a51-8622-be6e7dd1538e" alt=""><figcaption></figcaption></figure>

***

<figure><img src="https://1155212587-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgoqdluo05I2RXHZpTr-887967055%2Fuploads%2ForwW3SLqkpvYy6rYjXhs%2Foutput.png?alt=media&#x26;token=1b5e64ef-795a-4cd4-b7ed-0c881bd2b314" 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",
            "settings": {
              "chartShowLegend": true,
              "chartLegendPosition": "Bottom",
              "chartLegendFontColor": "255,0,0",
              "isChartLegendBold": true,
              "title": "Average Annual Precipitations",
              "chartFont": "Trebuchet MS",
              "chartFontSize": 20,
              "chartDataLabelColor": "Red"
            }
          }
        ]
      }
    ]
  }
}
```

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.powerpointgeneratorapi.com/examples/chart/chart-styling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
