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

Refresh KendoChart with new data

1 Answer 364 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mihai
Top achievements
Rank 1
Mihai asked on 25 Mar 2019, 08:22 PM

Hi,

I have a chart with radio buttons above that switch between "month" and "day" data. When I change the data set to monthly by updating the categories and series of the chart, the x-axis is still displaying the daily labels. I searched the documentation and don't see a "refresh" method like the one available for the jQuery version. Can you please provide a React example of how to update a chart with a new data set?

Your help is appreciated,

Mihai

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 26 Mar 2019, 08:24 AM
Hello, Mihai,

The Chart will be refresh when one of its properties bound to the state is changed.

This is an example that dynamically changes the type of line and the data at the same time:

https://stackblitz.com/edit/react-9jp9nc?file=app/main.jsx

Regards,
Stefan
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Mihai
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or