Skip to content

A React implementation of Edward Tufte's sparkline concept

Notifications You must be signed in to change notification settings

bedekelly/simple-react-sparklines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple React Sparklines

A React implementation of font-size responsive Sparklines. A Sparkline is a small unlabelled graphic with no axes, typically in-line with text, which shows the general trend of a dataset.

Sparkline

Pic: an animated Sparkline created using requestAnimationFrame; demo found in the animated-sparkline branch.

Use

The Sparkline graphic scales with the font size, and adopts the colour of the font around it. To override this, props like style can be added just like any HTML element, and will be passed into the inner SVG element.

<SparkLine data={stockData} />
<SparkLine data={stockData} min={-20} max={1280} />
<SparkLine data={stockData} style={...} />

About

A React implementation of Edward Tufte's sparkline concept

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published