Docs

API reference

Chart

Show an exact comparison or trend with supplied numeric data.

presentation.tsx

<Chart id="trend" x={9} y={26} w={82} h={54} type="line" data='[{"label":"Q1","value":42},{"label":"Q2","value":58}]' showAxes="true" showLabels="true" ariaLabel="Quarterly adoption" />

Props reference

Keep these values literal and serializable so Canvas, Inspector, validation, and export can process them reliably.

APIPropertyType / valuesRequiredDescription
Shared native-layer propsidstringYesStable, unique layer identifier. Required for every visible native layer.
xnumberYesLeft position as a percentage of the slide canvas.
ynumberYesTop position as a percentage of the slide canvas.
wnumberYesFrame width as a percentage of the slide canvas.
hnumberYesFrame height as a percentage of the slide canvas.
groupIdstring—Groups native children without adding a wrapper element.
groupNamestring—Human-readable name for a group in Workbench.
sharedIdstring—Matches the same layer type across adjacent Morph slides; unique within each slide.
rotationnumber—Clockwise rotation in degrees.
opacitynumber—Layer opacity from 0 to 1.
motionJSON string—Versioned declarative action sequence. Keep a complete static final frame.
interactionJSON string—Versioned click interaction for slide navigation or a link.
Charttypebar | line | area | pie | donut | scatterYesChart visualization type.
dataJSON stringYesOne to 24 rows; every row needs a finite numeric value and may include label, x, size, and color.
chartDataByTypeJSON string—Optional data sets keyed by chart type.
chartPresetexecutive | minimal | vivid—Visual preset.
chartThemelight | dark-gold—Chart-specific theme.
paletteaurora | editorial | gilded | ocean | sunset—Named color palette.
colorModepalette | single | emphasis | gradient—Color distribution strategy.
emphasisIndexnumber—Data point emphasized by color mode.
annotationIndex / annotationText / annotationColornumber | string—Optional annotation target, label, and color.
barGapcompact | balanced | airy—Spacing for bar charts.
barRadius / areaOpacity / donutHolenumber—Rounded bars, area fill opacity, or donut hole size.
lineSmoothboolean—Smoothes a line or area path.
showAxes / showGrid / showLabelsboolean—Shows axes, grid, or labels.
labelMode / labelColorall | value | category | none | color—Label visibility mode and color.
numberFormatauto | integer | decimal | percent | currency | compact—Value formatting.
decimals / currencynumber | string—Decimal places and currency code or symbol.
sortinput | ascending | descending—Data ordering.
referenceValue / referenceLabel / referenceColornumber | string—Optional reference line value, label, and color.
chartMotionauto | grow | draw | sweep | pop | none—Chart entrance motion.

Required syntax

Use id, x, y, w, h, type, and data. data is a JSON string of label and value entries, and the supplied values are preserved exactly.

Make data legible

Use nearby Text to state units, period, and source. showAxes, showLabels, palette, and chartMotion are supported presentation props when they clarify the data.