colorchartjs
v1.0.0
Published
Colors for chart js chart
Downloads
2
Maintainers
Readme
colorchartjs
Colors for chart js chart
Usage/Examples
import { colorchartjs } from "colorchartjs";
// var colordata = colorchartjs(array data, color for value greater than 0, color for value below than 0 , 0 is starting value)
var x = colorchartjs([4, 56, -2, -4, 6], "green", "red", 0);
console.log(x);
// return in console
/* [
"green",
"green",
"red",
"red",
"green"
] */