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

# Other classes: Charts and sparklines

## `ChartExLegend`

`Excel.ChartLegend` of a chartEx chart.

Not exported by name. You get it from the API.

### ChartExLegend properties

| Name | Type | Description |
| - | - | - |
| `format` | `ChartLegendFormat` | read-only |
| `height` | `number \| undefined` | |
| `left` | `number \| undefined` | |
| `overlay` | `boolean` | |
| `position` | `ChartLegendPosition \| "Invalid"` | |
| `showShadow` | `boolean` | |
| `top` | `number \| undefined` | |
| `visible` | `boolean` | |
| `width` | `number \| undefined` | |

### `ChartExLegend.set()`

```ts theme={null}
set(
  properties: ChartExLegend | UpdateData<ChartExLegend>,
  options?: UpdateOptions,
): void
```

**Not implemented.** These Office.js members throw: `legendEntries`.

## `ChartExPart`

A chartEx part, read once per text and written back on each edit.

Not exported by name. You get it from the API.

### `ChartExPart.assertLive()`

```ts theme={null}
assertLive(): void
```

### `ChartExPart.chart()`

```ts theme={null}
chart(): XElement
```

`cx:chart`, the parent of the title, plot area and legend.

### `ChartExPart.child()`

```ts theme={null}
child(local: string): XElement | undefined
```

### `ChartExPart.cx()`

```ts theme={null}
cx(local: string): XName
```

### `ChartExPart.ensure()`

```ts theme={null}
ensure(local: string, attrs: Record<string, string>): XElement
```

The child `local` of `cx:chart`, created bare in schema order.

### `ChartExPart.noteChange()`

```ts theme={null}
noteChange(): void
```

### `ChartExPart.root()`

```ts theme={null}
root(): XElement
```

### `ChartExPart.seal()`

```ts theme={null}
seal(handle: object): void
```

### `ChartExPart.themePalette()`

```ts theme={null}
themePalette(): ThemePalette | undefined
```

## `ChartExTitle`

`Excel.ChartTitle` of a chartEx chart: the bare title shows "Chart Title", as in Excel.

Not exported by name. You get it from the API.

### ChartExTitle properties

| Name | Type | Description |
| - | - | - |
| `format` | `ChartTitleFormat` | read-only |
| `horizontalAlignment` | `ChartTextHorizontalAlignment` | |
| `left` | `number \| undefined` | |
| `overlay` | `boolean` | |
| `showShadow` | `boolean` | |
| `text` | `string` | Excel writes a typed title as `cx:rich`; a font set before moves onto it. |
| `textOrientation` | `number` | |
| `top` | `number \| undefined` | |
| `verticalAlignment` | `ChartTextVerticalAlignment` | |
| `visible` | `boolean` | |

### `ChartExTitle.delete()`

```ts theme={null}
delete(): void
```

### `ChartExTitle.set()`

```ts theme={null}
set(properties: ChartExTitle | UpdateData<ChartExTitle>, options?: UpdateOptions): void
```

### `ChartExTitle.setFormula()`

```ts theme={null}
setFormula(_formula: string): void
```

**Not implemented.** These Office.js members throw: `getSubstring`.

## `InnerChart`

The chart part's tree, read once per text and written back on each edit.

Not exported by name. You get it from the API.

### InnerChart properties

| Name | Type | Description |
| - | - | - |
| `frameNoun` | `"chart"` | read-only What removing the whole chart means in this host: "paragraph", "shape". |
| `axes` | `ChartAxes` | read-only Excel.Chart.axes. |
| `categoryAxisTitle` | `string \| undefined` | The primary category-axis title the chart paints; undefined when the axis is absent, deleted, or untitled. Write "" or undefined to remove it. |
| `chartType` | `string` | read-only Plot families in document order, deduplicated: "bar", "bar+line" (combo). |
| `displayBlanksAs` | `ChartDisplayBlanksAs` | How blank cells plot: "NotPlotted" (a gap), "Zero" or "Interplotted" (joined). |
| `format` | `ChartAreaFormat` | read-only Excel.Chart.format: the chart area's fill, border and default font. |
| `legend` | `ChartLegend` | read-only Excel.Chart.legend. |
| `legendPosition` | `string` | Where the legend sits: bottom, top, left, right, topRight, or "none" when the chart has no legend. Writing creates the legend when absent; writing "none" removes it. |
| `plotArea` | `ChartPlotArea` | read-only Excel.Chart.plotArea. |
| `secondaryValueAxisMaximum` | `number \| undefined` | |
| `secondaryValueAxisMinimum` | `number \| undefined` | |
| `secondaryValueAxisTitle` | `string \| undefined` | The secondary value axis' title; refuses when no plot references one. |
| `title` | `string \| undefined` | |
| `titleFormat` | `ChartTitleFormat` | read-only Extension (Excel's `chart.title.format`; `title` here is the text): the title's fill, border and font. The font lives on the title's own text, or its `c:txPr` while Word words it. |
| `valueAxisMaximum` | `number \| undefined` | |
| `valueAxisMinimum` | `number \| undefined` | The primary value axis' pinned minimum in data units; undefined = auto-scale. A pin crossing the other pinned end refuses. |
| `valueAxisTitle` | `string \| undefined` | The primary value-axis title; same contract as `categoryAxisTitle`. |

### `InnerChart.addSeries()`

```ts theme={null}
addSeries(options: AddSeriesOptions): ChartSeries
```

Append a series, modelled on the target plot's last one (axis wiring and
cache structure are cloned; the theme's accent cycle colours it). For a
combo chart, `plotKind` picks the family ("column", "line", …); default
is the first plot. Omitting `name` leaves the legend entry blank.

### `InnerChart.assertLive()`

```ts theme={null}
assertLive(): void
```

Throws when the frame left its part.

### `InnerChart.chartRoot()`

```ts theme={null}
chartRoot(): XElement
```

The live `c:chartSpace` root.

### `InnerChart.colorStyle()`

```ts theme={null}
colorStyle(): XElement | undefined
```

The chart's `cs:colorStyle` part; a host that keeps none reads as Excel's default.

### `InnerChart.detached()`

```ts theme={null}
detached(noun: string): Error
```

### `InnerChart.frameSizePt()`

```ts theme={null}
frameSizePt(): { height: number; width: number }
```

The frame's size in points, for plot-area geometry.

### `InnerChart.getDataTable()`

```ts theme={null}
getDataTable(): ChartDataTable
```

Excel.Chart.getDataTable(): throws when the chart type cannot show one.

### `InnerChart.getDataTableOrNullObject()`

```ts theme={null}
getDataTableOrNullObject(): ChartDataTable
```

Excel.Chart.getDataTableOrNullObject(): `isNullObject` when the chart type cannot show one.

### `InnerChart.noteChange()`

```ts theme={null}
noteChange(): void
```

### `InnerChart.seal()`

```ts theme={null}
seal(handle: object): void
```

### `InnerChart.setColorStyle()`

```ts theme={null}
setColorStyle(root: XElement): void
```

### `InnerChart.styleAxisTitle()`

```ts theme={null}
styleAxisTitle(title: XElement): void
```

The look a new axis title takes: Office's 10pt grey on a styled chart.

### `InnerChart.textRef()`

```ts theme={null}
textRef(formula: string): XElement
```

A `c:strRef` with its cache for a cell formula; a host without cells leaves it empty.

### `InnerChart.themePalette()`

```ts theme={null}
themePalette(): ThemePalette | undefined
```
