Guide: Add a Chart
Goal: render an on-chain chart (line/area/bar/scatter/pie) from live data.
Bind a chart slot to an IChartData source; the chart renders fully on-chain as SVG:
compose.slot({
resolver: "0x<chart-slot-adapter>", // an adapter bridging IChartData -> an image slot
kind: "myChartData",
args: encodedArgs, // (source resolver, series config)
});
Charts are themeable and resizable at render time — pass a palette and dimensions in the presentation context; the same chart re-colors and resizes with no redeploy. Chart margins self-correct to the font size, so labels never clip. The chart fails closed to an axes-only frame if its source is unavailable.
See Theming for render-time chart styling.