Skip to main content
<Chart> maps to Chart.js syntax and converts to a native PowerPoint chart. Supported types are line, bar, area, scatter, pie, radar, bubble and waterfall. Combo charts, mixing line, bar and area in one chart, are also supported.

Components

<Chart>

The container. Type is set with type, and size and position with ordinary CSS, either in document flow or absolutely with box.
Background fills (gradients included), outlines and border radius all work through style.

<ChartTitle> and <Legend>

Both optional.

<XAxis> and <YAxis>

XAxis defaults to a category axis, YAxis to linear. Override with type. JSON attributes use a single-quoted outer wrapper: attr='{"key":"val"}'.
Number formatting gotchas. In tickFormat, wrap alphabetic literals in quotes, because bare m, d, y, h, s, a and p are date and time tokens. For percentages use decimals with tickFormat=0%, so 0.08 renders as 8%.

<Dataset>

Any attribute Chart.js accepts per point can take an array of values, one per data point. For bar charts, position: insideEnd in dataLabels puts the label inside the bar rather than above it.

Colours

Theme variables var(--accent1) through var(--accent6) track the deck palette, so a theme change carries into the chart. Literal rgb() and hex values also work.

Defaults

Styling is optional throughout, and PowerPoint’s defaults apply when omitted: 1pt dark grey lines, dark grey text in the theme font, no gridlines.

Examples

Line chart with a forecast series

Multiple series, null for gaps, a dashed forecast that continues from the last actual, and currency formatting in millions.

Stacked bar with data labels

Stacking needs both a shared stack ID on the datasets and stacked="true" on the value axis.

Pie

For pie charts labels goes on <Chart> rather than on an axis.

Scatter and bubble

Bubble charts use the same scatter type with a third value per point for the radius: data="[[0.7, 2.7, 10], [1.8, 3.2, 4]]".

Chart variations

Waterfall

A single series showing deltas from a starting value. Bars listed in subtotals are absolute and anchored to zero; everything else floats as a delta.
Increase, decrease and total default to accents 1, 2 and 3. Override them with formatOverrides on the chart, or style individual bars with pointOverrides on the dataset.

Combo charts

Combos mix line, bar and area. Instead of one type on <Chart>, each type gets a <Plot> with its datasets nested inside. For a secondary axis, mark the second <YAxis> with secondary="true" (it moves to the right) and set axis="secondary" on the datasets that belong to it.