Skip to content

This class changes, in the form of a gradient color, according to the informed percentage, an object passed in its construction.

Notifications You must be signed in to change notification settings

marcusvi200/gradient-heat-map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gradient Heat Map - Version 0.9.11

Browser Support

Chrome Firefox Safari Opera Edge
Latest ✔ Latest ✔ Latest ✔ Latest ✔ Latest ✔

Example

See a simple example!

How to use

Instantiating a GradientHeatMap

var divEl = document.getElementById('barColor');
var gradientHeatMap = new GradientHeatMap(divEl);

Run the Gradient in Object

let percentage = 50;
let startColor = "#008000";
let middleColor = "#ffff00";
let endColor = "#ff0000";

gradientHeatMap.run(position_GradientHeatMap.right,percentage,startColor,middleColor,endColor);

Position types

Position Direction
position_GradientHeatMap.top To top
position_GradientHeatMap.right To right
position_GradientHeatMap.left To left
position_GradientHeatMap.bottom To bottom
position_GradientHeatMap.top_right Diagonal from right to top
position_GradientHeatMap.top_left Diagonal from left to top
position_GradientHeatMap.bottom_right Diagonal from right to bottom
position_GradientHeatMap.bottom_left Diagonal from left to bottom

About

This class changes, in the form of a gradient color, according to the informed percentage, an object passed in its construction.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published