Update chart
update_chartChanges an existing ChartKit chart by id and replaces it in any open Google Slides deck that contains it. It can change the numbers (table), the type (chart_type), sort, highlight, text (title, subtitle, footnote, axis titles, unit), annotations, orientation, legend (position or none), value labels on or off, and series or category colours. Only the fields sent change; table, annotations and highlight replace the previous value whole, colors adds to earlier ones. annotations: [] removes the callouts; a title, subtitle or footnote sent as "" is removed. Charts built by hand in the extension accept table, title, subtitle, footnote, axis titles, legend, value_labels, colors, highlight, sort on single-series bars and a chart_type between bar and line types; anything else is refused in the result notes, which point to the Edit button on the chart.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chart_id": "<chart_id>"
},
"name": "update_chart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | "none" keeps the given order — use it for funnels, process steps and any sequence. Default sorts single-series bars and donuts largest-first, except when the categories already look like an ordered sequence (arrows, "Step"/"Stage"/day/week labels, weekdays, or numbers). "value" forces the sort even then. | |
| unit | No | Unit of every value, e.g. "EUR m", "%", "k units". "%" becomes a label suffix. | |
| gantt | No | The project plan for chart_type "gantt": one entry per activity, each with an optional bar (start + end) and/or a milestone date. Dates are ISO ("2026-01-05") or natural language ("5 Jan 2026", "Q1 2026"). | |
| label | No | chart_type "custom" only: short name of the chart kind, e.g. "Dumbbell". | |
| table | No | values is row-major: values[seriesIndex][categoryIndex]. In stacked charts (stackedBar, stackedBar100, mekko, waterfall) the first series is the top segment of each stack and the last sits on the axis, as in think-cell. Prefer plain numbers; strings like "1,234" or "12%" are parsed as 1234 and 12. Example: {"categories":["2023","2024"],"series":[{"name":"Revenue"}],"values":[[10,12]]}. For chart_type "waterfall" only, a cell may instead be the string "total" (think-cell's "e" is accepted too) to mark that category as a computed subtotal/ending bar that stands on the axis (e.g. "Subtotal", "Total", "Sum" or "End") — its bar height is the cumulative sum of every category before it, not a value you supply, and ChartKit renders it in the distinct total color automatically. Never mark the first category "total": with nothing before it to sum, it renders as a zero-height bar — give the opening category its real starting number instead. For chart_type "harveyBall", every value is a 0-100 fill percentage for that row x column ball (e.g. 75 fills three-quarters of the circle) — series are the rows, categories are the columns. For chart_type "scatter", categories are the numeric x values written as strings (e.g. "20", "45") and each series is one set of y values, one per x. For chart_type "bubble", categories are the bubble names and there are exactly three series in this order: x, y, size. For chart_type "mekko", categories are the columns and series the segments stacked to 100% in each; a column's width is the sum of its values, so values are real sizes, not percentages. For chart_type "gantt", prefer the `gantt` input instead — `table` is only a fallback, shaped as one series per activity and exactly these categories (any order): "Start", "End", "Milestone" — date cells as ISO or natural language, or a blank string when not applicable. | |
| title | No | Chart title. Only when the user asks for one. | |
| colors | No | Colour overrides by name: a series name, or in a one-series bar chart or donut a category name, to a hex or rgb() colour, e.g. {"Revenue": "#1F4E79"}. Omit to keep the brand palette. | |
| legend | No | Legend position, or "none" to hide it. Omit for the default (right for multi-series charts and donuts). | |
| x_unit | No | Unit of a scatter/bubble chart's x values, e.g. "%". "%" becomes a label suffix on the x axis. | |
| records | No | chart_type "custom" only: record-shaped data, instead of `table`. One row per category; the Vega-Lite spec reads each field by its id. Every field may be a number or text. Precompute any derived column (difference, rank, ratio) into the rows, since the spec cannot calculate. | |
| chart_id | Yes | Chart id from visualize_data, create_chart or list_charts_in_deck. | |
| footnote | No | Line under the chart, e.g. a data source. Only when the user asks for one. | |
| subtitle | No | Line under the title. Only when the user asks for one. | |
| gridlines | No | Light gridlines behind the marks. Defaults to true; false hides them (same chart types as value_axis). | |
| highlight | No | Series and/or category names to keep in brand colour; all others are greyed. | |
| size_unit | No | Unit of a bubble chart's size series, e.g. "EUR m". Bubble size has no axis of its own. | |
| vega_lite | No | chart_type "custom" only: a Vega-Lite v5 spec, as a JSON string or object. Data is always { "name": "table" } (never inline values or a url). Without `records` the table is read in long form: fields category, series, value. No width, height or title (use title/subtitle/footnote). Transforms: aggregate, fold, bin, timeUnit, window, joinaggregate, stack, density, regression, loess, quantile, pivot, filter as a predicate object. No calculate and no expressions. Colours only as scale { "scheme": "chartkit" } or tokens ck:1..ck:8, ck:muted, ck:ink, ck:pos, ck:neg. Small multiples: facet plus top-level columns. A rejected spec returns its errors: fix them and call again. | |
| chart_type | No | Switch the chart to another native type with the same data, e.g. a bar chart to a line. | |
| value_axis | No | Value axis with numbers. Defaults to true; false hides it (bar, waterfall, line, scatter and bubble charts only). | |
| annotations | No | ChartKit's signature callouts, strongly encouraged wherever they clarify the story: delta between two key bars, cagr across a time series, refLine for a target/average, band for a value range, level for a bracketed range, axisBreak when one bar dwarfs the others. | |
| line_series | No | Combo chart: names of table series drawn as a line over the bars (stackedBar, stackedBar100, clusteredBar only), e.g. a rate or an average beside volumes. Put them last in the table; at least one series stays a bar. | |
| orientation | No | "horizontal" only applies to stackedBar, stackedBar100, clusteredBar, waterfall. | |
| center_label | No | Donut only: a headline number in the hole with a small caption under it, e.g. {"value": "33", "caption": "N = 128"}. | |
| value_labels | No | false hides the value labels on bars, slices and points; true shows them. Omit for the default. | |
| x_axis_title | No | Title under the x axis. Do not repeat the unit already in `x_unit`. | |
| y_axis_title | No | Title beside the value axis. Do not repeat the unit already in `unit`. | |
| secondary_axis | No | With line_series: the lines get their own value axis on the right (default true). false plots them on the bars' axis. |