A react component version of heatmap.js
The component only needs four parameters, data point, image url, image width and height, and an optional config Object. You can refer to
heatmap.js documentation
for more details
import Heatmap from 'react-heatmap-component'
const dataPoints = {
max: 100,
min: 0,
data: [{
x: 50,
y: 20,
value: 64
}, {
x: 23,
y: 11,
value: 55
}]
}
<Heatmap
imgUrl={imgUrl}
dataPoints={dataPoints}
height={height}
width={width}
/>
build
npm run build
dev
Source code is in the lib
folder
npm run dev