Skip to content

@shbernal/pptxgenjs


@shbernal/pptxgenjs / index / OptsChartData

Interface: OptsChartData

Defined in: core-interfaces.ts:2003

Extended by

Properties

_dataIndex?

optional _dataIndex?: number

Defined in: core-interfaces.ts:2004


customLabels?

optional customLabels?: string[]

Defined in: core-interfaces.ts:2034

Custom text label per data point, replacing the auto-generated value label. Index aligns with values[]. Empty string or missing entries fall back to the chart-level label settings. Supported for BAR, LINE, AREA, RADAR, PIE, and DOUGHNUT chart types.

Example

ts
['Low', '', 'High']  // only points 0 and 2 get custom labels

errorBars?

optional errorBars?: ChartErrorBarOptions | ChartErrorBarOptions[]

Defined in: core-interfaces.ts:2057

Error bars for this series (<c:errBars>).

  • Supported for BAR, BAR3D, LINE, AREA, and SCATTER chart types (RADAR has no error bars in the schema).
  • Pass a single config, or an array to draw both X and Y error bars (SCATTER/AREA only; BAR/LINE use the first entry).

Examples

ts
{ valueType: 'percentage', value: 5 } // ±5% error bars
ts
{ valueType: 'fixedVal', value: 2, barType: 'plus', noEndCap: true }
ts
{ valueType: 'cust', plusValues: [1, 2, 1], minusValues: [0.5, 1, 0.5] }

Since

v6.0.0


labels?

optional labels?: string[] | string[][]

Defined in: core-interfaces.ts:2012

category labels

Examples

ts
['Year 2000', 'Year 2010', 'Year 2020'] // single-level category axes labels
ts
[['Year 2000', 'Year 2010', 'Year 2020'], ['Decades', '', '']] // multi-level category axes labels

Since

labels string[][] type added v3.11.0


name?

optional name?: string

Defined in: core-interfaces.ts:2017

series name

Example

ts
'Locations'

pointStyles?

optional pointStyles?: ChartDataPointStyle[]

Defined in: core-interfaces.ts:2047

Per-data-point visual overrides (border / fill), index-aligned with values[]. Empty ({}) or missing entries fall back to series/chart styling. Supported for BAR, LINE, AREA, SCATTER, PIE, and DOUGHNUT chart types.

Example

ts
pointStyles: [
  { border: { pt: 2, color: 'FF0000' } }, // point 0: red 2pt border
  {},                                     // point 1: default
  { fill: '00B050', border: { type: 'dash', color: '404040' } }, // point 2
]

Since

v5.3.0


sizes?

optional sizes?: number[]

Defined in: core-interfaces.ts:2022

bubble sizes

Example

ts
[5, 1, 5, 1]

values?

optional values?: number[]

Defined in: core-interfaces.ts:2027

category values

Example

ts
[2000, 2010, 2020]