set_cell_chart_config
Configure chart for a notebook cell: set x-axis column, per-query type/options, and shared right axis for multi-query charts.
Instructions
Configure the chart for a draw-mode cell. The cell's ;-separated SELECTs AUTO-COMBINE into one chart sharing the first query's x-axis; queries holds one config per statement (index-aligned). Queries combine when their x-axis kind matches: all-temporal merge by time, all-categorical merge by category name. Each query keeps its own type (line/area/stepLine/stepArea/bar/stackedBar/scatter/pie/candlestick); set axis:"right" (+ optional right_axis) for a series on a different unit/scale; enabled:false opts a query out (the first query is always included — it defines the x-axis). For a candlestick query, supply ohlc:{open,high,low,close} (required — a candlestick needs an explicit ohlc mapping). When x_column is a NUMERIC column (not a timestamp/category) it renders as a continuous value axis. Numeric-x charts are single-query (they don't combine). Patch semantics: top-level x_column/right_axis null = preserve; queries null = preserve; queries: [] clears overrides (back to inference); a non-null queries array REPLACES all per-query configs (send one entry per ;-split statement — a non-empty array whose length differs from the statement count is rejected). pie/scatter/stackedBar only render as a chart of their own (single-query).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cell_id | Yes | ||
| queries | Yes | One config per `;`-split query, index-aligned. Send the FULL array — one entry per statement, never a partial subset: a non-null array REPLACES all per-query configs, so any omitted statement loses its config. A non-empty array whose length ≠ the cell's `;`-split statement count is REJECTED. Null (the whole array) preserves the current config; `[]` resets every statement to inference; a `null` entry infers just that statement. | |
| x_column | Yes | Shared x-axis column (the first query's). Null preserves. | |
| buffer_id | Yes | ||
| right_axis | Yes | Shared right y-axis; meaningful when some query has axis='right'. Null preserves. |