Chart
MoleculeToken-aware primitive chart library at @/modules/ui/Chart. M1 ships seven SVG-based charts (Line, Bar, Area, Pie, Donut, Scatter, SparkLine) that consume a unified `Series` data shape. Colors auto-resolve from --primary / --secondary / --success / --warning / --error / --info, so dark mode and theme swaps work without any extra work. Pixel-identical EJS sibling at modules/ui/Chart/Chart.ejs. M3+ stubs (BubbleChart, HeatmapChart, TreemapChart, RadarChart, FunnelChart, SankeyChart, CandlestickChart, GaugeChart) are exported but render null until implemented; see PLANS/38-Charts.md.
Daily active users vs new signups
- Active users
- New signups
<LineChart
series={[
{ id: 'active', name: 'Active users', data: [{ x: 'Mon', y: 1200 }, /* … */] },
{ id: 'signups', name: 'New signups', data: [{ x: 'Mon', y: 300 }, /* … */] },
]}
height={220}
/>Revenue vs expenses (monthly)
- Revenue
- Expenses
<BarChart
series={[
{ id: 'revenue', name: 'Revenue', data: [{ x: 'Jan', y: 4200 }, /* … */] },
{ id: 'expenses', name: 'Expenses', data: [{ x: 'Jan', y: 2800 }, /* … */] },
]}
radius={4}
/>Engagement over the week (smoothed)
- Active users
- New signups
<AreaChart series={series} smooth fillOpacity={0.18} />Sales by category
- Electronics
- Clothing
- Food
- Books
- Other
<PieChart
series={[{
id: 'share', name: 'Category share',
data: [
{ x: 'Electronics', y: 35 },
{ x: 'Clothing', y: 25 },
{ x: 'Food', y: 20 },
{ x: 'Books', y: 12 },
{ x: 'Other', y: 8 },
],
}]}
/>Sales by category (donut)
- Electronics
- Clothing
- Food
- Books
- Other
<DonutChart series={pieSeries} innerRadius={0.62} />Inline sparklines
MRR +24%
DAU +8%
<SparkLine values={[12, 14, 11, 17, 19, 16, 22]} width={120} height={28} filled />
<SparkLine values={[5, 7, 6, 9, 8, 11]} width={120} height={28} />