> ## Documentation Index
> Fetch the complete documentation index at: https://prismeai-legacy.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Charts Block.charts

> Display data visualizations.

<Accordion title="Configuration Options">
  <ParamField path="type" type="string">
    Required. Chart type: 'column', 'line', or 'pie'.
  </ParamField>

  <ParamField path="data" type="Array">
    Required. Data for the chart (array of arrays).
  </ParamField>

  <ParamField path="config" type="Object">
    <Expandable title="Optional. Chart configuration">
      <ParamField path="x" type="Object">
        <Expandable title="Optional. X-axis configuration.">
          <ParamField path="type" type="string">
            Data type for x-axis values.
          </ParamField>

          <ParamField path="label" type="string">
            Label for x-axis.
          </ParamField>
        </Expandable>
      </ParamField>

      <ParamField path="y" type="Object">
        <Expandable title="Optional. Y-axis configuration.">
          <ParamField path="type" type="string">
            Data type for y-axis values.
          </ParamField>

          <ParamField path="label" type="string">
            Label for y-axis.
          </ParamField>
        </Expandable>
      </ParamField>
    </Expandable>
  </ParamField>

  <ParamField path="customProps" type="Object">
    Optional. Additional properties for the chart.
  </ParamField>
</Accordion>

<Accordion title="Example YAML">
  ```yaml theme={null}
  - slug: Charts
    type: line
    data:
      - ["Month", "Sales", "Expenses"]
      - ["Jan", 1000, 400]
      - ["Feb", 1500, 460]
      - ["Mar", 1300, 420]
      - ["Apr", 1700, 500]
    config:
      x:
        type: category
        label: Month
      y:
        type: value
        label: Amount ($)
    customProps:
      height: 400
      seriesField: category
      smooth: true
    onInit: myInitBlockCharts
    updateOn: myUpdateBlockCharts
  ```
</Accordion>
