Welcome Guest Search | Active Topics |

Reset zoom back to 100%
Leonard Toh
#1 Posted : Friday, July 28, 2017 5:30:50 AM(UTC)
Rank: Newbie

Groups: jQueryDV, Registered
Joined: 3/29/2016(UTC)
Posts: 6

Thanks: 0 times
Was thanked: 1 time(s) in 1 post(s)
Hi,

I am using jqChart jquery. How do I simulate the "Reset zoom to 100%" event in query? Is there a function in the jqChart object i can call?

Thanks.
Dragan
#2 Posted : Friday, July 28, 2017 8:24:24 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
We don't have a spatial function for this, but you can use the following code:

Code:
var chart = $('#jqChart').jqChart('chart');

var axes = chart.axes.items;
for (var i = 0; i < axes.length; i++) {
    axes[i].resetZoom();
}

chart.partialDelayedUpdate();
Best Regards,
Dragan Matek
jqChart Inc.
Leonard Toh
#3 Posted : Friday, July 28, 2017 10:47:27 PM(UTC)
Rank: Newbie

Groups: jQueryDV, Registered
Joined: 3/29/2016(UTC)
Posts: 6

Thanks: 0 times
Was thanked: 1 time(s) in 1 post(s)
Hi,

Thanks for your sample codes. When there is multiple y-axes, it works for the active series but doesn't seems to work for other y-axes. The axes.items returned all the x/y axes correctly but somehow axes[i].resetZoom() only works for the active series.

How do I make it work for all the series/y-axis in the chart?

Thanks.
Dragan
#4 Posted : Tuesday, August 1, 2017 9:18:50 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
Is it possible to send us (support@jqchart.com) your example, so we can investigate it?
Best Regards,
Dragan Matek
jqChart Inc.
Users browsing this topic
Guest (3)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

FlatEarth Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.072 seconds.