Angular Chart Reclaculate CategoryAxis labels step after zoom
1 Answer 9 Views
Samvel
Top achievements
Rank 1
Samvel asked on 01 May 2021, 07:56 AM

Hello

I have an Angular column chart. On render event, I calculate the   CategoryAxis labels steps. Then after zoomEnd event, I  get new (current) categories and according to them,  again  I recalculate the   CategoryAxis labels steps to have new steps(distance) for labels.

The question is, that after setting the new step size, the chart initialized again with "0" levels zooming. I mean after setting the new steps I lose my zoomed stage.

 

Thanks in advance

1 Answer, 1 is accepted

Sort by
0
Georgi Denchev
Telerik team
answered on 05 May 2021, 01:19 PM

Hi, Samvel,

I assume you are using setOptions to change the labels.step inside the zoomEnd event which causes the chart to be destroyed and re-created.

If this is the case, you can follow the example provided in the Maintain Pan and Zoom State on Rebind Knowledge Base article.

Here is a dojo sample which you can examine:

https://dojo.telerik.com/@gdenchev/ikEdIped/2 

Best Regards,
Georgi Denchev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Asked by
Samvel
Top achievements
Rank 1
Answers by
Georgi Denchev
Telerik team
Share this question
or