Labels and notes
| Field | Writes |
|---|---|
heading, subheading | text above the chart |
xTitle, axes[].title | axis titles |
showLabel | the value of each point or bar |
labels | your own text for each value |
labelAngle | turned category names |
format, axes[].format | every number, or the numbers of one axis |
lines | a target, an average, a date |
annotations | a note on a point |
From code
ts
chart.addLine({ value: 60, label: 'Average' });
chart.addAnnotation({ at: 'Feb', value: 73, text: 'Holiday' });
chart.clearNotes();Your own elements
decorate receives the SVG: add a header or a watermark, which exports keep.
ts
{ ...spec, insetTop: 40, decorate: ({ svg, width, theme }) => { /* append elements */ } }