heatmap-fix

0.0.2 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i heatmap-fix

Weekly Downloads

1

Version

0.0.2

License

MIT

Last publish

Collaborators

  • xngiser