# Change Pie Color

After converting the chart to a **Pie Chart**, you can customize the **color of each pie segment** to improve visual clarity and differentiation between data categories.

In the Widget Dashboard architecture, pie segment colors are configured by inserting records into the database table **`DSH_WIDGET_DATA_COLOR`**.\
Each record maps a specific data value in the chart series to a color.

***

#### Pie Color Configuration via Database

To change the pie colors, insert one record per data value into the **`DSH_WIDGET_DATA_COLOR`** table.\
The following examples configure different colors for each quarter.

***

#### Record 1 – Quarter 1

| Column     | Value       |
| ---------- | ----------- |
| ID         | `901010101` |
| SERIES\_ID | `9010101`   |
| DATA       | `QUARTER1`  |
| COLOR      | `green`     |

***

#### Record 2 – Quarter 2

| Column     | Value       |
| ---------- | ----------- |
| ID         | `901010102` |
| SERIES\_ID | `9010101`   |
| DATA       | `QUARTER2`  |
| COLOR      | `yellow`    |

***

#### Record 3 – Quarter 3

| Column     | Value       |
| ---------- | ----------- |
| ID         | `901010103` |
| SERIES\_ID | `9010101`   |
| DATA       | `QUARTER3`  |
| COLOR      | `#FF0000`   |

***

#### Record 4 – Quarter 4

| Column     | Value       |
| ---------- | ----------- |
| ID         | `901010104` |
| SERIES\_ID | `9010101`   |
| DATA       | `QUARTER4`  |
| COLOR      | `#0000FF`   |

> Colors can be defined using **named colors** (for example, `green`, `yellow`) or **hex color codes**.

***

#### Verify the Pie Chart Colors

After inserting all color configuration records:

1. Open the dashboard page again.
2. Click the **Training** menu (or the configured dashboard menu).

***

#### Expected Result

Each pie segment is now rendered using the configured color for its corresponding quarter.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FUl9KSmXOauzBoniXO0fx%2Fimage.png?alt=media&#x26;token=d05eb051-d88b-48eb-b93c-b04b7d1abb14" alt=""><figcaption></figcaption></figure>

***

#### Summary

By configuring the **`DSH_WIDGET_DATA_COLOR`** table:

* You gain full control over pie segment colors
* Charts become easier to interpret visually
* The same dataset can be styled differently without changing data logic

This completes the visual customization of the Pie Chart in the Widget Dashboard.


---

# 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.onewebstack.com/building-apps/ui-page-designer/ux-ui-components/dashboard/widget-dashboard/steps-to-create-a-widget-dashboard/change-pie-color.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.
