1.2.2 • Published 3 years ago

heatmapfromdata v1.2.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

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);
1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago