Home Forums Chart Support Can the charts colors be done through UI Reply To: Can the charts colors be done through UI

#34806

@arvindkelvin,

You can use the set method to change the color of dataseries dynamically. Please find the code-snippet below,

 $(".changeColor").click(function (e) {
  chart.data[0].set("color", e.target.id)
}); 

Also, kindly take a look at this JSFiddle for an example with complete code.

changing data-series color on button click


Adithya Menon
Team CanvasJS