0.0.2 • Published 9 years ago
heatmap-fix v0.0.2
heatmap-fix
this is a fix edition for heatmap. the fix is by itbeihe, please refer to https://github.com/substack/node-heatmap/pull/8 for the fix detail.
Please get the docs and APIs from original site.
example
var heatmap = require('heatmap-fix');
var heat = heatmap(500, 500, { radius : 30 });
for (var i = 0; i < 5000; i++) {
var rho = Math.random() * 2 * Math.PI;
var z = Math.pow(Math.random(), 2) * 200;
var x = 250 + Math.cos(rho) * z;
var y = 250 + Math.sin(rho) * z;
heat.addPoint(x, y);
}
heat.draw();
var fs = require('fs');
fs.writeFileSync('blob.png', heat.canvas.toBuffer());
install
With npm, just do:
npm install heatmap-fix