Chart input
The data, chart types, annotations and style options create_chart accepts.
create_chart, update_chart and get_live_chart_embed take the same chart input, except size, which only create_chart takes. Only chart_type is required by the schema. Every type except gantt and custom also needs table. Send numbers already scaled to the unit, such as 41.2 with "unit": "EUR m", not 41200000.
Chart types
| chart_type | Use it for | Table shape |
|---|---|---|
stackedBar | Composition over time | Series stack in each category. The first series is the top segment. |
stackedBar100 | Mix shift | Like stackedBar; each stack is drawn as 100%. |
clusteredBar | Two or three series side by side, or a plain single-series bar chart | Series sit next to each other in each category. |
line | A trend over six or more points | One line per series. |
scatter | Relationship between two measures | Categories are the numeric x values as strings, such as "20". Each series holds y values. |
waterfall | A bridge from one total to another | Values are signed steps. A cell set to "total" draws a subtotal bar. |
donut | One part-of-whole with five slices or fewer | One series; each category is a slice. |
mekko | Market structure: segment size and share | Categories are columns, series are segments. A column's width is the sum of its values. |
bubble | Three measures per item | Categories name the bubbles. Exactly three series, in the order x, y, size. |
harveyBall | Criteria against options | Series are rows, categories are columns, values are 0 to 100 fill. |
gantt | A project plan | Send gantt instead of table. |
custom | What no native type draws: dumbbell, slope, heatmap, small multiples | A Vega-Lite spec in vega_lite. See custom charts. |
For horizontal bars, send stackedBar, stackedBar100, clusteredBar or waterfall with "orientation": "horizontal". A single-series horizontal bar chart is a stackedBar with one series.
Fields
Data
The chart to draw. See chart types.
stackedBarstackedBar100clusteredBarlinescatterwaterfalldonutmekkobubbleharveyBallganttcustomThe numbers. values is indexed values[seriesIndex][categoryIndex]. Required for every type except gantt and custom.
The project plan for chart_type: "gantt". See Gantt charts.
custom only. Record-shaped data for the Vega-Lite spec, instead of table. See custom charts.
custom only. A Vega-Lite v5 spec, as a JSON string or object.
custom only. A short name for the kind of chart, such as "Dumbbell".
Units
The unit of every value, such as "EUR m", "%" or "k units". ChartKit picks one number format per chart from the data and the unit. "%" becomes a suffix on every label.
The unit of a scatter or bubble chart's x values. "%" becomes a suffix on the x axis labels.
The unit of a bubble chart's size series.
Callouts and focus
Callouts drawn on the chart. Leave the field out to let ChartKit add the obvious one, send [] for none. See annotations.
Series or category names to keep in brand colour; everything else turns grey. Names must match the table exactly. Not used by gantt charts.
By default ChartKit sorts single-series bar charts and donuts largest first, unless the categories already read as a sequence: years, steps, stages, weekdays, numbers or arrows. "none" keeps your order, for funnels and processes. "value" sorts even a sequence.
valuenoneLayout and style
create_chart only. The box the image will fill on the slide, in points; a 16:9 Google Slides page is 720 × 405. ChartKit lays the chart out for the box and returns sizePt, the size to insert the image at, which fits inside it. update_chart keeps the box. Not for custom charts. See Put the chart on a slide.
"vertical""horizontal" applies to stackedBar, stackedBar100, clusteredBar and waterfall.
verticalhorizontalLegend position, or "none" to hide it. Multi-series charts and donuts get a legend on the right by default.
righttopbottomleftnonefalse hides the value labels on bars, slices and points. Omit for the default, which labels every value.
trueThe value axis with numbers, on bar, waterfall, line, scatter and bubble charts. false hides it.
trueLight gridlines behind the marks, on the same chart types as value_axis.
Colour overrides by name, as hex or rgb(): a series name, or a category name in a one-series bar chart or donut. For example { "Revenue": "#1F4E79" }. Omit to use the brand palette.
Combo charts. Names of series drawn as lines over the bars, on stackedBar, stackedBar100 and clusteredBar. Put them last in the table; at least one series must stay a bar.
trueWith line_series, gives the lines their own value axis on the right. false plots them on the bar axis.
Donut only. A headline number in the hole with an optional caption under it.
Text
Charts have no title, subtitle or footnote unless you send one. On a slide, the slide title usually carries the message and the source sits in a footnote outside the chart.
A line under the chart, such as the data source.
Title under the x axis. Do not repeat the unit given in x_unit.
Title beside the value axis. Do not repeat the unit given in unit.
Table shapes
The table is the same object for every native type except gantt. What the series and categories mean depends on the type, as the chart types table shows. A few near-miss shapes are accepted and converted.
- A list of rows with a header row, where the first column holds the categories.
- Series given as plain strings, or with their own
valuesarray. - Numeric categories, which become strings.
- For a single series,
valuesas a flat list.
Waterfall totals
In a waterfall, each value is a step up or down. A cell set to "total" draws a bar from the axis to the running sum of every category before it. Give the first category its real starting value; a "total" there has nothing to sum.
Annotations
annotations is a list of callouts, each with a kind: delta, cagr, refLine, band, level, axisBreak. Anchored kinds point at a bar or point by index.
An anchor is an object with a category_index and an optional series_index, both 0-based. Without series_index it points at the stack total. On stacked and waterfall charts, a delta or CAGR with series_index measures that series' own values. On clustered bars, lines and scatter, it anchors to that one series.
delta
Leave it out for a relative change such as +22%. ChartKit switches to the absolute difference when either value is zero or negative, or the unit is %. Send "abs" to always show the difference in the chart's unit.
abspctcagr
Compound annual growth between two anchors. Only for yearly categories such as 2021 or FY24; use a delta for months or quarters.
The earlier year.
The later year.
refLine
A horizontal line at a target, average or threshold.
band
A value range drawn as two reference lines with one label.
Defaults to the range, such as 40–60.
level
A bracket between two anchors.
axisBreak
Breaks the value axis so one large bar stops flattening the rest. Use it when the largest value is more than about four times the next. Leave out from and to to cut the largest gap between bars automatically; give both to choose the hidden range. One per chart, and not on donut, mekko or Harvey ball charts.
Must be greater than from.
Automatic callouts
When annotations is left out of create_chart, ChartKit adds at most one callout and one axis break, and the result text says which. They are stored with the chart, so update_chart keeps them until you send new annotations.
| Added | When |
|---|---|
cagr | stackedBar, clusteredBar or line with three or more categories that are all years. Measured first to last on the highlighted series, else the stack total on stacked bars, else the first series. |
delta | The same charts with three or more quarters, months or weeks. A relative change, first to last. |
axisBreak | stackedBar or clusteredBar with three or more categories whose tallest bar is more than four times the next. |
Send "annotations": [] for a chart without callouts. No callout is added with sort: "value" or line_series, and no axis break with line_series.
Gantt charts
Send gantt instead of table. Dates are ISO, such as "2026-01-05", or natural language, such as "5 Jan 2026" or "Q1 2026". annotations, highlight, sort, unit and orientation do not apply.
One entry per row of the plan.
The visible timeline as start and end dates. Omit either to fit the plan.
Vertical bands across all rows, such as a holiday, each with from, to and an optional label.
A vertical line with a label at one date, each with date and an optional label. date may be "today".
A table also works as a fallback: one series per activity and the categories Start, End and Milestone, with date strings or "" in the cells.
Custom charts
chart_type: "custom" draws a Vega-Lite v5 spec in ChartKit's styling, for charts no native type covers. Prefer a native type when one fits; native charts stay editable in the ChartKit editor and support annotations and label control.
- The data is always
{ "name": "table" }. Withoutrecords, the table is read in long form with the fieldscategory,seriesandvalue. - With
records, each row is one category:keynames the category field, andfieldslists the other columns byid. Compute derived columns into the rows, because the spec cannot calculate. - No width, height or title in the spec, no
calculatetransforms and no expressions. Colours come from{ "scheme": "chartkit" }or the tokensck:1tock:8,ck:muted,ck:ink,ck:posandck:neg. - A spec that ChartKit rejects returns the errors in the message, so you can fix it and call again.
Each with an id the spec uses and an optional name for the column header.
Limits
- The stored chart model and the stored input can each be up to 512 KB of JSON.
- One
axisBreakper chart. - Harvey ball values must be between 0 and 100. Waterfall is the only type that accepts
"total"cells.