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

Chart zooming while updating data

1 Answer 103 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Grzegorz
Top achievements
Rank 1
Grzegorz asked on 29 Nov 2018, 03:01 PM

Hello,

I have a scatterLine chart that is being updated few times per second (by adding new data to the array). I need to zoom in the chart.

Zooming gets reset every time a chart is updated. Is it possible to change that behavior?

 

Best Regards,

Grzegorz

1 Answer, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 03 Dec 2018, 02:43 PM
Hello Grzegorz,

You can handle the zoom event and update the respective from and to values the Navigator's select is bound to accoringly. This way when the Chart is rerendered with the new data, the from and to, set with the last zooming will be still applied:

https://stackblitz.com/edit/angular-6fbwjp?file=app/app.component.ts

Updating the Chart data and rerendering the Chart several times per second will likely not constitute the best UX, as zooming via the mousewheel typically would take a bit longer, but instead of handling the zoom event, you can also set the desired new from and to values programmatically (either when new data arrives or at some arbitrary moment).

I hope this helps.

Regards,
Dimiter Topalov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
General Discussions
Asked by
Grzegorz
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Share this question
or