Skip to content

PiTiLeZarD/react-minigraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm

react-minigraph

Install

npm install react-minigraph --save
yarn add react-minigraph

Run the demo

yarn install
yarn dev

Use

import { MiniGraph, MiniGraphLine, MiniGraphNormalBand, MiniGraphAverage};

const data: number[] = [ /* Your data */ ];

<MiniGraph data={data}>
    <MiniGraphLine curved filled />
    <MiniGraphNormalBand />
    <MiniGraphAverage />
</MiniGraphLine>

Will get you this:

Graph1

Colours are automatically generated using chroma-js, if you don't specify the starting colour, it'll pick one randomly.

Future Plans

Check out drafted releases for future plans

Prior Art

This project was inspired by react-sparklines.