Simple Chart
<zn-simple-chart>
ZnSimpleChart
A simple, pre-styled bar chart.
zn-simple-chart renders a small, opinionated bar chart with no axes or legend — handy for
inline sparklines and dashboard summary tiles. It accepts a single series of values via
datasets and optional x-axis labels via labels. If neither is provided, a
placeholder dataset is shown.
<zn-simple-chart> </zn-simple-chart>
Examples
With Your Own Data
Pass a datasets array with one entry and its data values, plus a matching
labels array for tooltip context.
<zn-simple-chart datasets="[{"data":[12,18,9,24,30,22,35,42]}]" labels="["Mon","Tue","Wed","Thu","Fri","Sat","Sun","Mon"]"> </zn-simple-chart>
Enable Animations
By default, bars render immediately with no animation. Add the enable-animations attribute to
make bars grow from the baseline on first render. Pass a number (milliseconds) to control the duration; bare
enable-animations defaults to 1500.
<zn-simple-chart enable-animations="3000" datasets="[{"data":[12,18,9,24,30,22,35,42]}]" labels="["Mon","Tue","Wed","Thu","Fri","Sat","Sun","Mon"]"> </zn-simple-chart>