> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lyzn.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Chart

> Data visualization component

# Chart

The `Chart` component renders simple charts and graphs. Currently supports bar, line, and pie charts.

## Usage

```jsx theme={null}
<Chart 
  type="bar" 
  data={[
    { label: "Jan", value: 10 },
    { label: "Feb", value: 20 },
    { label: "Mar", value: 15 }
  ]} 
/>
```

## Props

<ResponseField name="type" type="string" required>
  Type of chart: `bar`, `line`, `pie`, `doughnut`.
</ResponseField>

<ResponseField name="data" type="array" required>
  Array of data points `{ label: string, value: number, color?: string }`.
</ResponseField>

<ResponseField name="height" type="number" default="200">
  Height of the chart in pixels.
</ResponseField>

<ResponseField name="xAxis" type="boolean" default="true">
  Show X-axis labels.
</ResponseField>

<ResponseField name="yAxis" type="boolean" default="true">
  Show Y-axis labels.
</ResponseField>

## Examples

### Pie Chart

```jsx theme={null}
<Chart 
  type="pie" 
  data={[
    { label: "Mobile", value: 60, color: "blue" },
    { label: "Desktop", value: 40, color: "green" }
  ]} 
  height={250} 
/>
```
