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

Chart filtering issue

4 Answers 44 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Fernando
Top achievements
Rank 1
Fernando asked on 05 May 2014, 03:33 PM
Hi,

We're having some strange problems when filtering a Data Source used on a chart, AFTER changing the series type.

Here's a link reproducing the issue:
http://trykendoui.telerik.com/uloR

After the timeout functions, the chart should be columns, right?
Are we doing something wrong?

Thanks in advance.

4 Answers, 1 is accepted

Sort by
0
Iliana Nikolova
Telerik team
answered on 07 May 2014, 08:31 AM
Hi Fernando,

In order to make dynamic changes to Kendo UI Chart options it is recommended using the setOptions method (instead of chart.options and refresh). For example: 
setTimeout(function() {
  //....
  var chart = $("#chart").data("kendoChart");
  chart.setOptions({seriesDefaults: {type: "line"}})
}, 2000);
For your convenience here is the updated example. 

Regards,
Iliana Nikolova
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Fernando
Top achievements
Rank 1
answered on 07 May 2014, 01:39 PM
Thanks! I don't know why I thought that setOptions wouldn't work for changing series options.
0
Fernando
Top achievements
Rank 1
answered on 07 May 2014, 01:45 PM
Just occurred to me: which is the right way to change options of only one of the series?
0
Iliana Nikolova
Telerik team
answered on 07 May 2014, 02:45 PM
Hi again Fernando,

Basically you could use the setOptions method to change options for a particular series, however keep in mind you should set entire series configuration through this method. For your convenience I modified the example.

Regards,
Iliana Nikolova
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Charts
Asked by
Fernando
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
Fernando
Top achievements
Rank 1
Share this question
or