Make a chart from data
make_chartDraw a chart from numbers as editable layers in a design: line, area, bar, horizontal bar, stacked bar, scatter, donut, pie, sparkline, progress ring, gauge or radar. Every point, bar, tick and label is computed exactly. Pick a style, a palette and a font_size; never hand-write chart paths.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | Where the chart sits in its parent, and its size, px. | |
| y | Yes | ||
| max | No | Progress ring, gauge and radar: the full-scale value (default 100, or radar's largest value). | |
| axes | No | Axis labels, x and y together (default: per style; off for sparklines and rings). `x_labels` and `y_labels` set each side on its own. | |
| dots | No | A dot on each point (default: per style). | |
| grid | No | ||
| kind | No | ||
| name | No | The chart layer's name (default "Chart"). | |
| sizes | No | Scatter: a size per point, making it a bubble chart. | |
| style | No | How it is drawn (default clean). Vary it with the design. | |
| ticks | No | Grid lines (default 4). With both y_min and y_max the lines are exactly (y_max - y_min) / ticks apart. 0 = no grid lines, no y tick labels and no left margin. | |
| width | Yes | ||
| y_max | No | ||
| y_min | No | Fix the value range (default: from 0, or the data's minimum when it is below 0, up to a round number above the maximum). | |
| corner | No | Bar corner radius px (default per style; half the width = pill). | |
| height | Yes | ||
| intent | Yes | One short sentence: what you change and why. Kept in the design history. | |
| labels | No | A label per value along the x axis (per bar, segment or spoke). | |
| legend | No | A key of series names above the plot (default: when 2+ series); on donuts and pies, of the `labels` (default: when given). | |
| prefix | No | ||
| series | Yes | ||
| smooth | No | Curve lines through the points (default: per style). | |
| suffix | No | ||
| page_id | Yes | The page to work on, as returned by create_design. | |
| palette | No | Series colours in order, as hex. Default: a built-in palette. | |
| step_at | No | Step chart: where the level changes between two points. `start` (default) holds a value until the next point, `end` jumps at the first point of each pair, `middle` changes halfway. | |
| decimals | No | Decimal places in value labels (default: 0 for whole data, else 1), or "auto" to print as many as the data and fixed range need. | |
| x_labels | No | The category labels under the plot (default: as `axes`). | |
| x_values | No | Scatter: the x of each point (default 0, 1, 2...). | |
| y_labels | No | The value tick labels left of the plot (default: as `axes`). | |
| bar_width | No | Bar thickness as a share of its slot, 0.1 to 1 (default per style). | |
| font_size | No | Size of every chart label, px (default: the height / 22, at least 24 px, so it reads when the chart is shown small; below about 20 px the result warns). | |
| parent_id | No | Put the chart inside this layer (the scene when omitted). | |
| thickness | No | Ring thickness, px (donut, progress ring, gauge). | |
| grid_color | No | Hex. | |
| line_width | No | ||
| text_color | No | Hex. | |
| annotations | No | Points worth pointing out. | |
| font_family | No | ||
| value_labels | No | Label the last point / the top of each bar / the ring's value. |