The default chart type. Pass an array of keys to plot multiple series with auto-detected time axis.
Hover either chart to see crosshair and tooltip sync across both via group: 'demo'.
const c = ced.chart(container, data, keys_or_opts)
c.update(newData) // swap data, re-render
c.resize() // force re-layout
c.destroy() // cleanup
| Option | Type | Default | Description |
|---|---|---|---|
| keys | string[] | [] | Data keys to plot |
| type | string | 'line' | line, area, bar, scatter, pie, donut |
| unit | string | '' | Left Y-axis unit |
| right | string[] | [] | Keys on right Y-axis |
| rightUnit | string | '' | Right Y-axis unit |
| height | number | 300 | Chart height in px |
| mark | number | — | Single reference line |
| marks | object[] | [] | Multiple reference lines/bands |
| dash | string[] | [] | Dashed line series |
| fill | string[] | [] | Area fill below line |
| smooth | boolean | false | Cardinal spline interpolation |
| stacked | boolean | false | Stack bar/area series |
| group | string | null | Crosshair sync group |
| colors | object | {} | Palette index per key |
| range | boolean | false | Date range selector |
| fmt | function | auto SI | Custom Y-axis formatter |