@vitral/chart
v0.2.0
Published
Framework-free SVG charts for Vitral: the engine (scales, scenes, formats, the options schema) and a DOM renderer with interaction and accessibility, which the Vue, React and Angular components wrap.
Maintainers
Readme
@vitral/chart
SVG charts with no framework in them: the engine and a DOM renderer, which the Vitral components wrap.
Options are shaped the way ApexCharts made familiar, and everything visual is
plain data, so an options object survives JSON.stringify and a visual editor
can walk chartOptionsSchema to build a form for it.
import { createChart } from '@vitral/chart';
const chart = createChart(element, {
type: 'area',
series: [{ name: 'Visits', data: [12, 41, 35, 51] }],
options: { chart: { height: 240 } }
});
chart.update({ series });
chart.destroy();Line, area, bar, lollipop, scatter, bubble, heat map, candlestick, pie, donut, radar and sparklines, with nice scales, datetime axes, a shared tooltip, legend toggles, zoom and pan, a toolbar with SVG/PNG/CSV export, brush, synced groups, annotations, keyboard walking with a live readout and an optional data table.
@vitral/chart/engine is the maths and the scene building on their own;
@vitral/chart/style is the class map and CSS.
LGPL-3.0-or-later. Part of the Vitral monorepo.
