chartist icon indicating copy to clipboard operation
chartist copied to clipboard

lines are not colored properly using draw function

Open nekromoff opened this issue 7 years ago • 1 comments

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.

nekromoff avatar Jul 25 '17 13:07 nekromoff

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!

Arantiryo avatar Nov 03 '22 11:11 Arantiryo