heatmapfromdata

1.2.2 • Public • Published

heatmapfromdata

A JavaScript library for drawing heatmaps with Canvas.

Demo: https://svitbka.github.io/heatmapfromdata/

heatmapfromdata('canvas').grad(gradient).data(data).draw(X, minValue);

Reference

Constructor

var heat = simpleheat('canvas');

Data

// set data of [[value1, value2, ... value10], ..., [value91, value92, ... value100]] format
heat.data(data);

Appearance

// set data of [[r1, g1, b1], [r2, g2, b2], ...] format
heat.gradient(grad);

Rendering

// draw a heat map using the required parameters, the variable X is calculated as follows: X = (The number of colors in the gradient) / (the sum of the modules of the maximum and minimum values in the data array), and the variable MinValue - the minimum values in the array data 
heat.draw(X, minValue);

Readme

Keywords

Package Sidebar

Install

npm i heatmapfromdata

Weekly Downloads

11

Version

1.2.2

License

ISC

Unpacked Size

5.26 kB

Total Files

3

Last publish

Collaborators

  • svitbka