About
Yagr is a high-level library used to render HTML5 Canvas charts based on the extra-fast library uPlot.
Why Yagr?
Why not use uPlot directly? uPlot is a flexible library that comes with an amazing API you can use to create your own plugins and implement different visualizations, only it's too low-level. If you need a lot of common chart features like a legend tooltip, stacking, and normalization, you'll have to implement them manually with uPlot. Yagr already has many of those features in place. Yagr is also configurable, meaning you can extend it or customize its look and behavior, while it also lets you extend uPlot objects directly.
Why not Yagr
If you aren't looking for Yagr features but instead need something specific that isn't in Yagr, use uPlot directly or check the issues. Otherwise, I recommend using and trying to expand Yagr, but also feel free to ask questions and bring up ideas on our Issues Page.
Features
- Lines, areas, columns, and dots as visualization types. Configurable per series
- Configurable Legend Tooltip
- Axes with extra options for decimal-level precision
- Scales with configurable range functions and transformations
- Plot lines and bands. Configurable draw layer
- Responsive charts (requires ResizeObserver)
- High-level support of stacked areas/columns
- Light/Dark theme
- Data normalization
- Configurable crosshairs, cursor markers and snapping
- Typescript
- Localization
- CSS Variables in color names
- Paginated inline legend
- Error handling and extended hooks
- Data alignment and interpolation for missing data