Skip to content

@shbernal/pptxgenjs


@shbernal/pptxgenjs / index / ChartDataPointStyle

Interface: ChartDataPointStyle

Defined in: core-interfaces.ts:2068

Per-data-point style override for a chart series. Each entry applies to the data point at the same index in values[]. Unset fields fall back to the series/chart-level styling.

Properties

border?

optional border?: BorderProps

Defined in: core-interfaces.ts:2074

Data-point border (line). Reuses BorderProps.

  • type: 'none' hides the border; 'dash' draws a dashed border.

Example

ts
{ pt: 2, color: 'FF0000' }

fill?

optional fill?: string

Defined in: core-interfaces.ts:2080

Data-point fill color (hex), overriding chartColors[idx]. Most meaningful on fill-based charts (BAR, AREA, PIE, DOUGHNUT).

Example

ts
'00B050'

pattern?

optional pattern?: PatternFillProps

Defined in: core-interfaces.ts:2093

Data-point pattern fill (<a:pattFill>), e.g. diagonal hatching, for the BAR/BAR3D and SCATTER charts that emit per-point c:dPt. Takes precedence over fill (OOXML allows only one fill per data point).

When pattern.fgColor is omitted it defaults to this point's resolved fill color (fill or the varied chartColors[idx]), giving a hatched version of the bar color; if no point color is resolvable it falls back to black. pattern.bgColor defaults to white.

Examples

ts
{ preset: 'ltUpDiag' }
ts
{ preset: 'diagCross', fgColor: 'C00000', bgColor: 'FFFFFF' }