Chartography is a charts drawing library.
npm install chartography
import { Heatmap } from 'chartogprahpy'
const root = document.getElementById('container')
const data = [
{ label: 'One', value: 100 },
{ label: 'Two', value: 200 },
{ label: 'Three', value: 300 },
// ...
]
const config = {
fill: '#00923F',
stroke: '#CCCCCC',
strokeHover: '#000000',
bg: '#FFFFFF',
medianColor: '#FF0000',
avgColor: '#0000FF',
width: '100%',
height: '360px',
rows: 7,
spacing: 1,
padding: 5,
sumByCol: true,
sumByRow: true,
showScale: true,
showMedian: true,
showAvg: true,
}
const heatmap = new Heatmap(root, data, config)
heatmap.render()
heatmap.setData([])
heatmap.render()
Chartography has Storybook powered documentation: https://chartography.kucheriavyi.ru/