Update line chart color dynamically

I’d like to be able to change the color of the line chart after initial configuration. I have tried the following:

chart.config.series[selectSeries].line.color = newColor;
chart.refresh();

But the line color does not change. If I read the value contained in chart.config.series[selectSeries].line.color, I can see that the color value does get updated to a new color value, but the line color displayed on the chart never changes from the initial config value.

Thanks for the help.

Hello,

Chart does not provide a method to customize a certain series. You need to redefine the whole “series” array:

http://webix.com/snippet/08efb0c3

Thank you, Maria. Your example was exactly what I needed.