Skip to content

Latest commit

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Library to generate SVG sparklines

Demo

Usage

<scriptsrc="sparklines.js"></script><spanclass="sparkline" data-values="1,4,3,6,5"></span><spanclass="sparkline sparkline-filled" data-values="1,4,3,6,5"></span>

Anything with the sparkline class will get an SVG sparkline made from the values in data-values appended. Add the class sparkline‑filled for a filled sparkline like above.

It's not a bad idea to add style too:

.sparklinesvg {
stroke: mediumseagreen;
stroke-width:1.5px;
}
.sparkline-filledsvg {
fill:rgba(60,179,113,0.25);
}

About

SVG sparklines

Resources

Stars

26 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages