---
title: "Charts"
hideTitleOnPage: true
---


## ChartType

**Enum Members**:

- `BAR` ("bar")
- `LINE` ("line")
- `PIE` ("pie")
- `SCATTER` ("scatter")
- `UNKNOWN` ("unknown")

## parseChart()

```ts
function parseChart(chart: Chart): Chart
```

**Parameters**:

- `chart` _Chart_


**Returns**:

- `Chart`

***


## BarChart

```ts
type BarChart = Chart2D & {
  type: "bar";
};
```

**Type declaration**:

- `type` _"bar"_


## BarData

```ts
type BarData = Pick<GeneratedChartElement, "group" | "label" | "value">;
```

***


## BoxAndWhiskerChart

```ts
type BoxAndWhiskerChart = Chart2D & {
  type: "box_and_whisker";
};
```

**Type declaration**:

- `type` _"box\_and\_whisker"_


## BoxAndWhiskerData

```ts
type BoxAndWhiskerData = Pick<GeneratedChartElement, "first_quartile" | "label" | "max" | "median" | "min" | "outliers">;
```

***


## Chart

```ts
type Chart = GeneratedChart;
```

***


## Chart2D

```ts
type Chart2D = Pick<GeneratedChart, "type" | "title" | "png" | "x_label" | "y_label" | "elements">;
```

***


## ChartElement

```ts
type ChartElement = GeneratedChartElement;
```

***


## CompositeChart

```ts
type CompositeChart = Pick<GeneratedChart, "type" | "title" | "png" | "elements"> & {
  type: "composite_chart";
};
```

**Type declaration**:

- `type` _"composite\_chart"_


## LineChart

```ts
type LineChart = PointChart & {
  type: "line";
};
```

**Type declaration**:

- `type` _"line"_


## PieChart

```ts
type PieChart = Pick<GeneratedChart, "type" | "title" | "png" | "elements"> & {
  type: "pie";
};
```

**Type declaration**:

- `type` _"pie"_


## PieData

```ts
type PieData = Pick<GeneratedChartElement, "angle" | "label" | "radius">;
```

***


## PointChart

```ts
type PointChart = Pick<GeneratedChart, 
  | "type"
  | "title"
  | "png"
  | "x_label"
  | "y_label"
  | "x_ticks"
  | "y_ticks"
  | "x_tick_labels"
  | "y_tick_labels"
  | "x_scale"
  | "y_scale"
| "elements">;
```

***


## PointData

```ts
type PointData = Pick<GeneratedChartElement, "label" | "points">;
```

***


## ScatterChart

```ts
type ScatterChart = PointChart & {
  type: "scatter";
};
```

**Type declaration**:

- `type` _"scatter"_

