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

Chart Zoom out other than mouse wheels

5 Answers 117 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Sriram
Top achievements
Rank 1
Sriram asked on 09 Oct 2017, 06:01 AM
Is there a way to zoom out charts other than using mouse wheels? I want to zoom out on double click on the area/range/line chart. How can i do that?

5 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 10 Oct 2017, 12:09 PM
Hello, Sriram,

I already provided an answer to this in the ticket.

I will share the code here, so more people can benefit from it:

http://dojo.telerik.com/ewAwO

We monitor both the support tickets and the forum threads. Please avoid posting duplicate threads at both places, as it can lead to overhead in our support department. Thank you for understanding.

Regards,
Stefan
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
Das, Avijit
Top achievements
Rank 1
answered on 04 May 2018, 03:46 AM

I dont think the solution you have provided is acceptable. You are just defaulting all the options on double click. What if i need some of the options to persist? For example, i have n number of plot bands drawn in the chart. The moment i double click and sets the default options, all my plot bands are also gone. Any other suggestion you have?

 

0
Stefan
Telerik team
answered on 04 May 2018, 05:19 AM
Hello, Das,

Thank you for the feedback.

As this is not supported out of the box, I just provided some approach which can be used and modified depending on the need.

In the case where the options have to be preserved, all of the options should be passed on the setOptions method in order to set completely the same options.

I hope this is helpful.

Regards,
Stefan
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
Das, Avijit
Top achievements
Rank 1
answered on 04 May 2018, 06:00 AM

Hi Stefan,

Thanks for your quick response. Can you please let me know how can i just hold the plot bands that are there in my chart when calling setOptions to zoom out? 

Regards,
Avijit

0
Stefan
Telerik team
answered on 07 May 2018, 05:39 AM
Hello, Das,

If the plotBands are part of the categoryAxis configuration, then the categoryAxis configuration should be passed to the setOptions method.

I modify the example to demonstrate this:

http://dojo.telerik.com/ijEnuCIk

If this is not the case, please share an example of the real scenario, so I could provide an approach best suited for it.

Regards,
Stefan
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.
Tags
Charts
Asked by
Sriram
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Das, Avijit
Top achievements
Rank 1
Share this question
or