chartist
chartist copied to clipboard
lines are not colored properly using draw function
chart.on("draw", function(context) {
if(context.type === "line") {
context.element.attr({
style: "stroke:hsl(" + Math.floor(Chartist.getMultiValue(context.value, "y") / max * 100) + ", 50 % , 50 % );"
});
}
});
does not work. Nor is this function documented properly, anyway, except for one example for bars.
Hello @nekromoff 👋
Chartist has recently been updated to version 1.0
with some new exciting changes like ESM and TypeScript support. The migration guide can be found right here.
Please let me know if the question is still relevant to you so we can further look into it!