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

Zoomable Chart: How to set zoom level?

2 Answers 721 Views
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 04 Mar 2020, 05:07 PM
I am working with vue 2.5.17 and typescript 3.1.1. A client has requested a chart to display data (lots of data points). I implemented use of the kendo vue line chart with panning and zooming enabled. The good news is that the client loves it. The bad news is that they want the chart to start off zoomed out all the way when it is shown. I checked the zoomable properties under the kendo-chart API for vue, but I didn't see an option for setting the zoom level. Is there a way to set the chart's zoom level to be all the way zoomed out on launch?

2 Answers, 1 is accepted

Sort by
0
Accepted
Martin
Telerik team
answered on 06 Mar 2020, 01:16 PM

Hello Paul,

You can achieve the desired functionality with the categoryAxis.max configuration. It controls the last date to be shown on the chart. For example, if you have 50 data points on your Line Chart, setting categoryAxis.min to 0 and categoryAxis.max to 50, the Line Chart will display all your data initially. In other words, the combination of the two configuration allows you to set the zoom level according to the range you have set.

Here you will find a small Stackblitz example for reference.

If I am missing something or I misunderstood the issue, please get back to me with some additional information, and I will gladly assist you.

Regards,
Martin
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
0
Paul
Top achievements
Rank 1
answered on 06 Mar 2020, 02:43 PM
This is exactly what I needed. Thank you!
Asked by
Paul
Top achievements
Rank 1
Answers by
Martin
Telerik team
Paul
Top achievements
Rank 1
Share this question
or