This is a migrated thread and some comments may be shown as answers.

Changing SeriesDefaults Options

1 Answer 64 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Niall
Top achievements
Rank 1
Niall asked on 08 Apr 2014, 10:00 AM
Hi,

Is it not possible to set the seriesDefaults options via the chart.options syntax?

I wish to be able to change multiple chart options after initialisation prior to refreshing the datasource, and many function correctly such as:

chart.options.legend.labels.color = "blue";
chart.dataSource.read(data);

However setting anything related to seriesDefaults has not effect:
chart.options.seriechart.options.seriesDefaults.markers.visible = true;
chart.options.seriesDefaults.markers.size = 30;
chart.options.seriesDefaults.markers.border.width = 5;
chart.dataSource.read(data);

Is it not possible to globally change series options such as label visibility? I wish to able to changed these options globally rather than refresh the datasouce and loop through each chartSeries setting options individually.

I have tried the chart.refresh() and chart.redraw() methods after the dataSource is refreshed.

Any help would be appreciated.

1 Answer, 1 is accepted

Sort by
0
Hristo Germanov
Telerik team
answered on 08 Apr 2014, 02:08 PM
Hello Niall,

seriesDefaults are executed initially or when you call chart.setOptions. But both of them do server requests.

Unfortunately after the chart is initially rendered seriesDefautls will be applied to the series and it will not work anymore. 

Please excuse us for the inconvenience.

Regards,
Hristo Germanov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Charts
Asked by
Niall
Top achievements
Rank 1
Answers by
Hristo Germanov
Telerik team
Share this question
or