Hi!
I’ve released SparklineSvg, a simple yet customizable, zero-dependency Elixir library for generating SVG sparkline charts.
The repository can be found on GitHub - sparkline_svg.
Documentation is available on Hex - SparklineSvg.
Features
- Supports various datapoint shapes.
- Pixel-perfect customization with options to show dots, lines, and areas.
- Ability to add vertical markers (lines or areas).
- Includes common reference lines.
Background
The goal is to provide something simple and stable for building dashboards. The library focuses exclusively on generating SVG sparkline charts (and will only do that in the future).
What’s next?
I plan to add a few more options to the library, with the goal of reaching a stable 1.0 version quickly. Here are some points I’m considering, but I would love to hear your ideas:
- Support normal bands, inspired by this concept: React Sparklines.
- Allow setting the window manually. Currently, the window is auto-set based on datapoints, but manual adjustment may be useful.
- Support
nil
(holes) in the datapoints.