Sets the color of line for the entire series. This can be overridden at dataPoint level in order to customize the color of line connecting any two dataPoints. The value of lineColor can be a “HTML Color Name” or “hex” code.
Default: Automatically taken from dataSeries color.var chart = new CanvasJS.Chart("container", { . . data:[{ lineColor: "red", }, ] . . }); chart.render();
Also See:
4 Comments
lineColor is not working in your example?
Can you please clear your browser cache and try again.
Can you change line color on an if else? If line is below 0, color it red. If above 0, color it black?
Nef ron,
Its not possible what exactly you are looking for, but you can change the lineColor based on dataPoint y-value. Here is a fiddle.