0

I have two dataseries and want to give different colors as follows. However no matter I assign different color, I am ending up with same color which is color of the last series (#006666).

 self.dataSeries[0].color = "#66FF66";
 self.dataSeries[1].color = "#006666";
 chart.options.series = self.dataSeries;
casillas
  • 16,351
  • 19
  • 115
  • 215

1 Answers1

1

This is the way you do it,

  1. first acess kendo chart > options > series[index] > color, then give the color you want
  2. refresh the kendo chart

Here code example :

$("#chart").data("kendoChart").options.series[0].color = "#66FF66";
$("#chart").data("kendoChart").options.series[1].color = "#006666";
$("#chart").data("kendoChart").refresh();

DEMO

Note : There is a chart and a button assign new color to change the series color

himawan_r
  • 1,760
  • 1
  • 14
  • 22