# Modifying Data Components

The **Chart Components** section allows you to refine and customize how your data is visualized. Depending on the selected chart type, different configuration options will be available. Below are the key components:

1. **Dynamic Data Mapping Based on Chart Type**
   * When a chart is selected, the relevant data mapping fields will be displayed.
   * Example: A **line chart** requires `X-Axis`, `Y-Axis`, `Pivot`, `Order By`, and `Filter` fields, whereas a **bubble chart** will have different data mappings.

<figure><img src="https://2441185785-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTNY9XuZbora2UmeM4sm%2Fuploads%2FnokXLFp3Zo9NYrA0LnBw%2Fimage.png?alt=media&#x26;token=e1543b0f-38b6-4735-9482-d39cac4fa495" alt=""><figcaption></figcaption></figure>

2. **Selecting and Modifying Data Fields**

* Click on a input to open a selection tray.
* Multiple fields can be selected or removed from the tray.

<figure><img src="https://2441185785-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTNY9XuZbora2UmeM4sm%2Fuploads%2FbnHfQAAuRR9JqshX375y%2Fimage.png?alt=media&#x26;token=a274bb53-dfed-4f54-800f-e4c80ca3d761" alt=""><figcaption></figcaption></figure>

* Click the `X` mark on a field (colum) to remove it.

<figure><img src="https://2441185785-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTNY9XuZbora2UmeM4sm%2Fuploads%2FFMsbsoLjqtvuIgpAEnxE%2Fimage.png?alt=media&#x26;token=f2c195fe-6b3c-4b99-a33c-2a66a71b60ea" alt=""><figcaption></figcaption></figure>

1. **Creating Custom or Calculated Fields**
   * Use the **custom metric** option to define a calculated field.
   * A pop-up will appear where you can write a formula and save it.
   * If an error occurs, AI will automatically prompt you to correct it.

<figure><img src="https://2441185785-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTNY9XuZbora2UmeM4sm%2Fuploads%2FenjHztfg8zMAI4jetPw9%2Fimage.png?alt=media&#x26;token=d53b9ed0-33f2-4e00-8d86-a64907bf4d55" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2441185785-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTNY9XuZbora2UmeM4sm%2Fuploads%2FDtMbtJpMBmcP4HlDkmRv%2Fimage.png?alt=media&#x26;token=37885028-3845-41a0-9d59-83613b33375f" alt=""><figcaption></figcaption></figure>

3. **Using Pivot Columns for Advanced Analysis (more details in next section)**

* Pivoting allows data to be split by a selected category.
* Example: To view **sales by market per month**, you can set:
  * `X-Axis`: `Month`
  * `Y-Axis`: `Sum(Sales)`
  * `Pivot`: `Market`

4. **Sorting with "Order By"**

* The **Order By** field controls the arrangement of data points.
* Example: Order sales **by year (ascending or descending).**

5. **Filtering Data for Dynamic User Control**

* Filters in this section allow dynamic filtering at the **chart view** level.
* Users can select multiple filters for interactivity.
* Default values for filters can be set by clicking on a **filter chip**, which opens a pop-up for customization.

<figure><img src="https://2441185785-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTNY9XuZbora2UmeM4sm%2Fuploads%2FiDFNzoXtZRQeYd3j6pwu%2Fimage.png?alt=media&#x26;token=7f49dd51-4dd6-4c2e-9894-9ee1e2977e5b" alt=""><figcaption></figcaption></figure>

6. **Final Step: Always Click "Apply"**\
   After making any changes, clicking **"Apply"** is a mandatory step to refresh and provision the dataset for visualization. Without this step, changes will not be reflected in the chart.


---

# 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.getinfinity.app/user-guide/comprehensive-user-guide/2.-charts/chart-customization/modifying-data-components.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.
