# Chart Interface

> Chart interface in the TX Sheet Control TypeScript API for the browser, with its syntax, 15 properties and a TypeScript example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Interface
- **Path:** TX Sheet Control > API Reference > TypeScript API > Browser Editor > Chart Interface
- **898 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/llms-full.txt

---

A worksheet-bound chart handle. Data references are resolved by the workbook calculation engine.

Package: `@txtextcontrol/tx-sheet-control`. Version: **2.0.0**.

Type-only declaration; it is not a JavaScript runtime constructor.

### Members

#### Properties

| Property | Description |
|---|---|
| [axisTitles](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/axistitles-property/llms-full.txt) | The axisTitles value of Chart. |
| [colors](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/colors-property/llms-full.txt) | The colors value of Chart. |
| [dataRange](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/datarange-property/llms-full.txt) | The dataRange value of Chart. |
| [elements](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/elements-property/llms-full.txt) | The elements value of Chart. |
| [filters](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/filters-property/llms-full.txt) | The filters value of Chart. |
| [id](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/id-property/llms-full.txt) | The id value of Chart. |
| [legend](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/legend-property/llms-full.txt) | The legend value of Chart. |
| [origin](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/origin-property/llms-full.txt) | The origin value of Chart. |
| [position](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/position-property/llms-full.txt) | The position value of Chart. |
| [series](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/series-property/llms-full.txt) | The series value of Chart. |
| [seriesOrientation](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/seriesorientation-property/llms-full.txt) | The seriesOrientation value of Chart. |
| [style](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/style-property/llms-full.txt) | The style value of Chart. |
| [title](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/title-property/llms-full.txt) | The title value of Chart. |
| [type](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/type-property/llms-full.txt) | The type value of Chart. |
| [presentation](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/presentation-property/llms-full.txt) | Configure chart layout, independent axes and native labels. |

### Examples

Create sample data and obtain this detached result from the owning document. Return the selected data to the report or application UI.

```typescript
import type { Workbook } from '@txtextcontrol/tx-sheet-control';

function createChartReport(book: Workbook) {
    const sheet = book.sheets.at(0);
    sheet.range('A1:B5').setValues([
        ['Region', 'Revenue'],
        ['North', 42000],
        ['South', 38500],
        ['East', 31200],
        ['West', 44900],
    ]);

    const chart = sheet.charts.add({
        type: 'column',
        title: 'Revenue by region',
        dataRange: 'A1:B5',
        anchor: { cell: 'D2' },
        size: { width: 480, height: 240 },
    });

    const result = chart.snapshot;
    return result;
}
```

### See Also

- [TypeScript Browser Editor API](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/llms-full.txt)
- [Charts and Sparklines](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/charts/llms-full.txt)

---

## In This Section

- [Chart.axisTitles Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/axistitles-property/llms-full.txt): Chart.axisTitles property in the browser TypeScript API, with its type { horizontal: string; vertical: string; } | undefined and a TypeScript example.
- [Chart.colors Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/colors-property/llms-full.txt): Chart.colors property in the TX Sheet Control TypeScript API for the browser, with its type string[] | undefined and a TypeScript example.
- [Chart.dataRange Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/datarange-property/llms-full.txt): Chart.dataRange property in the TX Sheet Control TypeScript API for the browser, with its type string | undefined and a TypeScript example.
- [Chart.elements Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/elements-property/llms-full.txt): Chart.elements property in the TX Sheet Control TypeScript API for the browser, with its type ChartElements | undefined and a TypeScript example.
- [Chart.filters Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/filters-property/llms-full.txt): Chart.filters property in the TX Sheet Control TypeScript API for the browser, with its syntax and a TypeScript example.
- [Chart.id Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/id-property/llms-full.txt): Chart.id property in the TX Sheet Control TypeScript API for the browser, with its type string and a TypeScript example.
- [Chart.legend Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/legend-property/llms-full.txt): Chart.legend property in the browser TypeScript API, with its type "left" | "right" | "top" | "bottom" | "none" and a TypeScript example.
- [Chart.origin Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/origin-property/llms-full.txt): Chart.origin property in the browser TypeScript API, with its type { sheetId: string; chartId: string; } | undefined and a TypeScript example.
- [Chart.position Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/position-property/llms-full.txt): Chart.position property in the TX Sheet Control TypeScript API for the browser, with its type ChartPosition and a TypeScript example.
- [Chart.presentation Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/presentation-property/llms-full.txt): Chart.presentation property in the TX Sheet Control TypeScript API for the browser: Native chart layout, transparency, independent axes and bar spacing.
- [Chart.series Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/series-property/llms-full.txt): Chart.series property in the TX Sheet Control TypeScript API for the browser, with its type ChartSeries[] and a TypeScript example.
- [Chart.seriesOrientation Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/seriesorientation-property/llms-full.txt): Chart.seriesOrientation property in the TX Sheet Control TypeScript API for the browser, with its type "columns" | "rows" | undefined and a TypeScript example.
- [Chart.style Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/style-property/llms-full.txt): Chart.style property in the TX Sheet Control TypeScript API for the browser, with its syntax, a TypeScript example and remarks on handles and validation.
- [Chart.title Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/title-property/llms-full.txt): Chart.title property in the TX Sheet Control TypeScript API for the browser, with its type string and a TypeScript example.
- [Chart.type Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/type-property/llms-full.txt): Chart.type property in the TX Sheet Control TypeScript API for the browser, with its type string and a TypeScript example.

---

## Nearby

- **Previous:** [CellValue Type](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellvalue/llms-full.txt)
- **Next:** [Chart.axisTitles Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/chart/axistitles-property/llms-full.txt)
