# Convert JSON to chart data

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

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

## Description

**What it does** Transform your JSON file into an insightful chart with this feature. It enables you to visualize data directly from JSON format, turning complex data structures into easily understandable charts. This process helps in data analysis and presentation, allowing you to gain deeper insights and communicate findings effectively. Whether you're working with large datasets or simple records, this tool simplifies the creation of various chart types, such as bar graphs, line charts, and pie charts, providing a visual representation that enhances data comprehension and decision-making.

The JSON to chart component has the identifier of json-chart-**X**, where **X** represents the instance number of the JSON to chart component.

**When to use it?** Let's say you've collected sales data in JSON format. You can use this node to quickly create charts like bar graphs or pie charts to visualize your sales performance and easily present it to your team or clients.

## Component settings

| Parameter Name | Description                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Input          | The target file.                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Chart type     | <p>Allow the customer to select the type of chart they want to generate. </p><p>There are a lot of different type of chart. </p><ul><li>Auto detect</li><li>Line chart</li><li>Multi-line chart</li><li>Bar chart</li><li>Stacked bar chart</li><li>Grouped bar chart</li><li>Column chart</li><li>Stacked column chart</li><li>Grouped column chart</li><li>Area chart</li><li>Stacked area chart</li><li>Pie chart</li><li>Donut chart</li></ul> |

## Advanced configurations

| Options        | Description                                                                                                                                                                                                               |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Enable caching | This option determines whether the results of the component are cached. This means that on the next run of the Flow, Diaflow will utilize the previous computed component output, as long as the inputs have not changed. |
| Caching time   | <p>Only applicable if the "Enable Caching" option has been enabled.<br>This parameter controls how long Diaflow will wait before automatically clearing the cache.</p>                                                    |

## Use case

Here is a simple use case of the JSON to chart component, where the JSON to chart component is being used to generate a chart with a basic JSON.

<figure><img src="/files/3Kd9AtFTFVLZdelT1PPa" alt=""><figcaption></figcaption></figure>


---

# 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.diaflow.io/workflow-builder/nodes/built-in-tools/convert-json-to-chart-data.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.
