abdelaz3r

abdelaz3r

SparklineSvg - Create SVG Sparkline

Hi! :wave:

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.

Most Liked

abdelaz3r

abdelaz3r

Just released new version:

  • Support :padding option specifying padding for specific side
  • Expose number :precision through general options
  • Support percentile/1 reference line
  • Support custom reference lines
fuelen

fuelen

Very good documentation! Thank you for sharing!

Last Post!

abdelaz3r

abdelaz3r

Just released 0.5 version with:

  • Support :sort option to control data sorting
  • Add set_x_window/2 function with :min and :max options

Thanks a lot for these kind words @fuelen :pray:

Where Next?

Popular in Announcing Top

Qqwy
Hello everyone, I wrote a small library today called MapDiff. It returns a map listing the (smallest amount of) changes to get from map...
New
alisinabh
Hey everyone i’ve developed a library for Jalaali calendar for elixir which supports converting Gregorian dates to Jalaali and vice vers...
New
josevalim
EDIT: since Ecto 3.0 final version is out, this post was amended to use the final versions in the instructions below. Hi everyone, We a...
New
RobertDober
Earmark is a pure-Elixir Markdown converter. It is intended to be used as a library (just call Earmark.as_html), but can also be used as...
239 12978 134
New
benlime
LiveMotion enables high performance animations declared on the server and run on the client. As a follow up to my previous thread A libr...
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
markmark206
simple_feature_flags is a tiny package that lets you turn features on or off based on which environment (e.g. localhost, staging, product...
New

Other popular topics Top

joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 31586 112
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 49266 226
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

We're in Beta

About us Mission Statement