Repository navigation
All styling moved to CSS. Smart y-axis ticks. Three themes.
CSS Theming
- All visual properties controlled via CSS custom properties
- No inline styles — override anything with plain CSS
- Series colors via
--sg-series-0,--sg-series-1, etc.
Themes (add a class to your container)
sg-tufte— maximum data-ink ratio, no grid, serif labelssg-midnight— dark background, luminous datasg-warmth— earthy tones on cream
Smart Y-Axis
- Nice round tick intervals (1, 2, 5, 10, 20, 50...)
- Tick count adapts to chart height
- Grid lines align with tick values
Reactive API (from v2.1)
chart.update(data)— re-render in placechart.destroy()— remove from DOM- Idempotent — calling
simplegraph()on same target replaces previous graph - Accepts SVG elements directly for framework integration