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

Pie Chart Refresh Doesn't Work When Datafields aren't default

1 Answer 142 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 01 Nov 2017, 11:48 AM

I created a dojo

https://dojo.telerik.com/@rareddy/exaRi

Top chart is taken from the Telerik demo, bottom chart is mine.  Click the "redraw" button at the top, and you'll notice my chart does not redraw and ends up being blank.

The only difference, and you can test this by copying the series, is that the "field", "datafield", and "colorfield" are specified in the datasource in mychart.

Am I doing something wrong or is this a bug?

 

 

 

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 02 Nov 2017, 08:42 AM
Hello,

The refresh method should only be used when a dataSource is set. The reason for the difference in behaviors in the two charts is that only bound series(with specified fields) will get new data from the dataSource. You should use the redraw or setOptions methods to update the chart when the data is set to the series. 

Regards,
Daniel
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Charts
Asked by
Bob
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or