Create or Refresh Chart Image
notion_create_chartRender bar, line, pie, and 20+ chart types as PNG or SVG and insert them into Notion pages or refresh existing charts in place.
Instructions
Render a chart image (PNG, or SVG) and put it on a page, or refresh an existing chart image in place. Types: bar, column, stacked_bar, stacked_column, grouped_column, line, area, stacked_area, pie, donut, scatter, and histogram (one row per observation; y is the value (x is ignored). bins sets the number of bins.); heatmap (x = column, series = row, y = the cell's value.); boxplot (one row per observation; x = group, y = value.); waterfall (rows in order; y = change. A row with series "total" shows the running total instead.); funnel (rows in stage order; y = how many reached the stage.); bullet (per x: a row with series "actual" (or none) and a row with series "target".); small_multiples (x and y as for a line chart; one small panel per series.); dual_axis (exactly two series: the first as columns (left axis), the second as a line (right axis).); treemap (x = item, y = size; optional series groups items (one color per group).); sankey (one row per flow: x = from, series = to, y = amount. Flows must only go forward (no loops).); network (one row per link: x = one end, series = the other, y = weight (line thickness).). Data is inline data ([{x, y, series?}]) or a source query that groups a database (x, y like "count" or "sum:Estimate", optional series). annotations add labeled reference lines; palette picks colors (default is a validated colorblind-safe order). data_table adds a toggle under the chart with a description and the numbers, for readers who can't see the image. For anything the types don't cover, pass a full Vega-Lite spec as vega_lite (data inline only; nothing is fetched). The recipe is remembered, so refresh_block_id re-renders it from current data. Prefer notion_views chart views when a live Notion chart is enough. Reversible with notion_undo.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| chart | No | Required for a new chart; optional on refresh (keeps the stored one). | |
| format | No | png (default) or svg (sharp at any zoom). | png |
| parent | No | New chart: page or block to insert into. | |
| source | No | ||
| caption | No | ||
| position | No | end | |
| vega_lite | No | Advanced: a complete Vega-Lite spec (data in data.values) instead of chart + data. Not refreshable. | |
| data_table | No | Add a toggle under the chart with a description and the data, as a text alternative. | |
| after_block_id | No | ||
| vega_lite_theme | No | vega_lite only: light (default), dark, or transparent, applied where the spec sets no colors of its own. | |
| refresh_block_id | No | An image block made by this tool: re-render it in place. |