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

Zooming out a chart programmatically.

2 Answers 415 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Ahmet
Top achievements
Rank 1
Ahmet asked on 09 May 2018, 07:05 PM
Hello

Is it possible to zoom out a chart programmatically without using the mouse scroll ? When I have 2 Y axis with two different series, sometimes the second series can be too high that I need to zoom out in order to see the second series.
I was wondering is there any programmatic way (Either on C# or Javascript) to zoom out a chart as soon as the chart is created.

Thanks.
Ahmet

2 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 14 May 2018, 04:03 PM
Hi Ahmet,

This is controlled by the min and max values of the axes (https://docs.telerik.com/devtools/aspnet-ajax/controls/htmlchart/functionality/zoom-pan-scroll#controlling-initial-view) so perhaps you can evaluate the data on the server and set the properties accordingly.

Such a method does not exist for the client, however. Perhaps you can change the min/max of the value axis and use .setOptions(), then .redraw() for the underlying kendo chart (see here: https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/chart), but I cannot guarantee this will work as there is no such official API. You can add your idea in the Kendo UI UserVoice portal so it fhis gets a good traction in the community, its implementation will be considered: http://kendoui-feedback.telerik.com/forums/127393-kendo-ui-feedback. Adding a detailed description of you you believe it should behave, what arguments it should take, how it should handle different chart and axis types, would help in its evaluation.


Regards,
Marin Bratanov
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.
0
Accepted
Marin Bratanov
Telerik team
answered on 15 May 2018, 07:30 AM
Just a quick follow up, our developers prepared the following example for you in case it will be helpful and it is what you are looking for: https://dojo.telerik.com/@SiliconSoul/IJOVoTeK.

--Marin

Tags
Chart (HTML5)
Asked by
Ahmet
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or