---
title: "Types: editor: Shapes and charts"
---

> 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.

# Types: editor: Shapes and charts

## `ChartLegend`

Import from `@reductoai/pptx/editor`.

```ts
type ChartLegend = "right" | "left" | "top" | "bottom" | "topRight" | "none"
```


## `ChartRef`

A chart reference (`c:f`) and whether it reads numbers (`c:numRef`) or text (`c:strRef`).

Import from `@reductoai/pptx/editor`.

| Name | Type | Description |
| --- | --- | --- |
| <a id="chartref-f" data-search="ChartRef.f"></a>`f` | <code>string</code> |  |
| <a id="chartref-multilevel" data-search="ChartRef.multiLevel"></a>`multiLevel?` | <code>&#123; across: boolean &#125;</code> |  |
| <a id="chartref-numeric" data-search="ChartRef.numeric"></a>`numeric` | <code>boolean</code> |  |


## `ChartRefCache`

`levels` (multi-level only) runs from the leaf out; `points` is the leaf.

Import from `@reductoai/pptx/editor`.

```ts
type ChartRefCache = ChartRef & { levels?: (string | null)[][]; points: (string | null)[] }
```


## `ChartSeriesData`

Import from `@reductoai/pptx/editor`.

| Name | Type | Description |
| --- | --- | --- |
| <a id="chartseriesdata-name" data-search="ChartSeriesData.name"></a>`name` | <code>string</code> |  |
| <a id="chartseriesdata-values" data-search="ChartSeriesData.values"></a>`values` | <code>(number &#124; null)[]</code> |  |


## `ChartSeriesEdit`

Import from `@reductoai/pptx/editor`.

```ts
type ChartSeriesEdit = { from: number; op: "move"; to: number } | { index: number; op: "remove" } | { hidden: boolean; index: number; op: "hide" }
```


## `ChartSeriesRefs`

Where one series reads its name, categories (or x values), values and bubble sizes.

Import from `@reductoai/pptx/editor`.

| Name | Type | Description |
| --- | --- | --- |
| <a id="chartseriesrefs-categories" data-search="ChartSeriesRefs.categories"></a>`categories?` | <code>string</code> |  |
| <a id="chartseriesrefs-name" data-search="ChartSeriesRefs.name"></a>`name?` | <code>string</code> |  |
| <a id="chartseriesrefs-size" data-search="ChartSeriesRefs.size"></a>`size?` | <code>string</code> |  |
| <a id="chartseriesrefs-values" data-search="ChartSeriesRefs.values"></a>`values` | <code>string</code> |  |
| <a id="chartseriesrefs-x" data-search="ChartSeriesRefs.x"></a>`x?` | <code>string</code> |  |


## `ChartSource`

Every series' references; `numericCategories`: the categories are numbers or dates.

Import from `@reductoai/pptx/editor`.

| Name | Type | Description |
| --- | --- | --- |
| <a id="chartsource-family" data-search="ChartSource.family"></a>`family` | <code>"category" &#124; "scatter" &#124; "bubble"</code> |  |
| <a id="chartsource-numericcategories" data-search="ChartSource.numericCategories"></a>`numericCategories` | <code>boolean</code> |  |
| <a id="chartsource-series" data-search="ChartSource.series"></a>`series` | <code><a href="/office/pptx/api/types-editor-shapes-and-charts#chartseriesrefs">ChartSeriesRefs</a>[]</code> |  |


## `ChartView`

The selected chart.

Import from `@reductoai/pptx/editor`.

| Name | Type | Description |
| --- | --- | --- |
| <a id="chartview-categories" data-search="ChartView.categories"></a>`categories` | <code>string[]</code> |  |
| <a id="chartview-cells" data-search="ChartView.cells"></a>`cells` | <code>ChartHiddenEmpty</code> | Select Data > Hidden and Empty Cells. |
| <a id="chartview-datalabels" data-search="ChartView.dataLabels"></a>`dataLabels` | <code>boolean</code> | Whether every series shows data labels. |
| <a id="chartview-design" data-search="ChartView.design"></a>`design` | <code>ChartDesign</code> | What the Chart Design tab shows: each element's state, the colour scheme, how many layouts and styles. |
| <a id="chartview-editable" data-search="ChartView.editable"></a>`editable` | <code>boolean</code> | False for scatter and bubble charts, whose sheet has x values: they are read only here. |
| <a id="chartview-elements" data-search="ChartView.elements"></a>`elements` | <code>&#123; label: string; part: string &#125;[]</code> | Every element the chart has, in the order of PowerPoint's element list. |
| <a id="chartview-key" data-search="ChartView.key"></a>`key` | <code>string</code> |  |
| <a id="chartview-legend" data-search="ChartView.legend"></a>`legend` | <code><a href="/office/pptx/api/types-editor-shapes-and-charts#chartlegend">ChartLegend</a></code> |  |
| <a id="chartview-legendentries" data-search="ChartView.legendEntries"></a>`legendEntries` | <code>SeriesEntry[]</code> | Select Data's Legend Entries (Series): every series in plot order, hidden ones too. |
| <a id="chartview-part" data-search="ChartView.part"></a>`part` | <code>string</code> | The element the Format pane edits; a click on the selected chart picks the one under it. |
| <a id="chartview-series" data-search="ChartView.series"></a>`series` | <code><a href="/office/pptx/api/types-editor-shapes-and-charts#chartseriesdata">ChartSeriesData</a>[]</code> |  |
| <a id="chartview-title" data-search="ChartView.title"></a>`title` | <code>string &#124; null</code> |  |
| <a id="chartview-type" data-search="ChartView.type"></a>`type` | <code>string</code> | The Excel chart type of the first series ("ColumnClustered", "Pie", …). |
| <a id="chartview-workbook" data-search="ChartView.workbook"></a>`workbook` | <code>boolean</code> | The chart reads cells of a workbook it embeds: Edit Data opens that workbook. |


## `ChartWorkbook`

What Edit Data opens: the chart's workbook and the references it reads from it. A chart with
no workbook gets one laid out from its own data (`made`); a chart linked to a file outside
the deck shows its last values, read-only (`linked` names the file).

Import from `@reductoai/pptx/editor`.

| Name | Type | Description |
| --- | --- | --- |
| <a id="chartworkbook-bytes" data-search="ChartWorkbook.bytes"></a>`bytes` | <code>Uint8Array</code> |  |
| <a id="chartworkbook-linked" data-search="ChartWorkbook.linked"></a>`linked?` | <code>string</code> |  |
| <a id="chartworkbook-made" data-search="ChartWorkbook.made"></a>`made?` | <code>boolean</code> |  |
| <a id="chartworkbook-refs" data-search="ChartWorkbook.refs"></a>`refs` | <code><a href="/office/pptx/api/types-editor-shapes-and-charts#chartref">ChartRef</a>[]</code> |  |
| <a id="chartworkbook-source" data-search="ChartWorkbook.source"></a>`source?` | <code><a href="/office/pptx/api/types-editor-shapes-and-charts#chartsource">ChartSource</a></code> | Present when the series form one block Edit Data can grow. |
| <a id="chartworkbook-visibleonly" data-search="ChartWorkbook.visibleOnly"></a>`visibleOnly` | <code>boolean</code> |  |


## `ClipPicture`

The copied shapes laid out alone, and the box their ink covers in hmm.

Import from `@reductoai/pptx/editor`.

| Name | Type | Description |
| --- | --- | --- |
| <a id="clippicture-bounds" data-search="ClipPicture.bounds"></a>`bounds` | <code><a href="/office/pptx/api/types-layout#layoutbbox">LayoutBBox</a></code> |  |
| <a id="clippicture-doc" data-search="ClipPicture.doc"></a>`doc` | <code><a href="/office/pptx/api/types-layout#layoutdocument">LayoutDocument</a></code> |  |


## `GradientEdit`

One change in the pane; a stop is named by its index in `GradientState.stops`.

Import from `@reductoai/pptx/editor`.

```ts
type GradientEdit = { kind: GradientFillType } | { angle: number } | { color?: string; position?: number; stop: number; transparency?: number } | { addStop: number } | { removeStop: number }
```


## `GradientState`

Import from `@reductoai/pptx/editor`.

| Name | Type | Description |
| --- | --- | --- |
| <a id="gradientstate-angle" data-search="GradientState.angle"></a>`angle` | <code>number</code> | Clockwise degrees of a linear gradient. |
| <a id="gradientstate-kind" data-search="GradientState.kind"></a>`kind` | <code><a href="/office/pptx/api/types-facade#gradientfilltype">GradientFillType</a></code> |  |
| <a id="gradientstate-stops" data-search="GradientState.stops"></a>`stops` | <code><a href="/office/pptx/api/types-editor-shapes-and-charts#gradientstopstate">GradientStopState</a>[]</code> | In the order the file keeps them, which the pane's stop numbers follow. |


## `GradientStopState`

Import from `@reductoai/pptx/editor`.

| Name | Type | Description |
| --- | --- | --- |
| <a id="gradientstopstate-color" data-search="GradientStopState.color"></a>`color` | <code>string</code> | `#RRGGBB`, resolved through the theme. |
| <a id="gradientstopstate-position" data-search="GradientStopState.position"></a>`position` | <code>number</code> | 0–1. |
| <a id="gradientstopstate-transparency" data-search="GradientStopState.transparency"></a>`transparency` | <code>number</code> | 0–1. |


## `PictureAspect`

Crop > Aspect Ratio: width over height, or the picture's own.

Import from `@reductoai/pptx/editor`.

```ts
type PictureAspect = { height: number; width: number } | "original"
```


## `PictureView`

The one selected picture: its crop and transparency, as Picture Format shows them.

Import from `@reductoai/pptx/editor`.

| Name | Type | Description |
| --- | --- | --- |
| <a id="pictureview-crop" data-search="PictureView.crop"></a>`crop` | <code><a href="/office/pptx/api/types-facade#cropinsets">CropInsets</a></code> |  |
| <a id="pictureview-key" data-search="PictureView.key"></a>`key` | <code>string</code> |  |
| <a id="pictureview-recolor" data-search="PictureView.recolor"></a>`recolor?` | <code><a href="/office/pptx/api/types-facade#picturerecolor">PictureRecolor</a></code> | The Recolor tile it shows; undefined for a recolor no tile writes. |
| <a id="pictureview-transparency" data-search="PictureView.transparency"></a>`transparency` | <code>number</code> |  |


## `ShapeColor`

`#RRGGBB`, or a colour of the deck's theme; `brightness` is Lighter (0 to 1) or Darker (-1 to 0).

Import from `@reductoai/pptx/editor`.

```ts
type ShapeColor = string | { brightness?: number; theme: ShapeThemeColor }
```


## `ShapeStyleState`

What Shape Fill and Shape Outline show as current; a field is absent when the shapes differ.

Import from `@reductoai/pptx/editor`.

| Name | Type | Description |
| --- | --- | --- |
| <a id="shapestylestate-beginarrow" data-search="ShapeStyleState.beginArrow"></a>`beginArrow?` | <code><a href="/office/pptx/api/types-facade#arrowheadstyle">ArrowheadStyle</a></code> |  |
| <a id="shapestylestate-dash" data-search="ShapeStyleState.dash"></a>`dash?` | <code><a href="/office/pptx/api/types-facade#shapelinedashstyle">ShapeLineDashStyle</a></code> |  |
| <a id="shapestylestate-endarrow" data-search="ShapeStyleState.endArrow"></a>`endArrow?` | <code><a href="/office/pptx/api/types-facade#arrowheadstyle">ArrowheadStyle</a></code> |  |
| <a id="shapestylestate-fill" data-search="ShapeStyleState.fill"></a>`fill?` | <code>string &#124; null</code> | `#RRGGBB`, or null for No Fill; absent on a gradient or picture fill. |
| <a id="shapestylestate-glow" data-search="ShapeStyleState.glow"></a>`glow?` | <code>number &#124; null</code> | The Glow, Reflection and Soft Edges preset ids (`EFFECT_PRESETS`), or null for none. |
| <a id="shapestylestate-gradient" data-search="ShapeStyleState.gradient"></a>`gradient?` | <code><a href="/office/pptx/api/types-editor-shapes-and-charts#gradientstate">GradientState</a></code> | Format Shape > Gradient fill: the type, angle and stops of a gradient fill. |
| <a id="shapestylestate-line" data-search="ShapeStyleState.line"></a>`line?` | <code>string &#124; null</code> | `#RRGGBB`, or null for No Outline. |
| <a id="shapestylestate-reflection" data-search="ShapeStyleState.reflection"></a>`reflection?` | <code>number &#124; null</code> |  |
| <a id="shapestylestate-shadow" data-search="ShapeStyleState.shadow"></a>`shadow?` | <code>number &#124; null</code> | The Shadow gallery's preset id (`SHADOW_PRESETS`), or null for No Shadow. |
| <a id="shapestylestate-softedge" data-search="ShapeStyleState.softEdge"></a>`softEdge?` | <code>number &#124; null</code> |  |
| <a id="shapestylestate-weight" data-search="ShapeStyleState.weight"></a>`weight?` | <code>number</code> | Points. |

Source: https://docs.reducto.ai/office/pptx/api/types-editor-shapes-and-charts/index.mdx
