It is currently Wed Apr 23, 2014 9:10 am Advanced search

High Stock External control for disable / enable zoomtype

Technical support for the Highcharts Stock package

High Stock External control for disable / enable zoomtype

Postby nalgonda » Thu Feb 16, 2012 11:48 am

I am using highcharts api to develop charts in my application. I am using highstack class from highcharts.

What I am looking is I want handle the zoom controls from external buttons.

for example there is a radio button like zoom (yes, no), if we select yes then zoom functionality should be enable in my chart. If no selected then zoom functionality should be disabled.

I have tried with following property:

zoomType: 'xy'

I have tried to reset the above property, but failed.

Please give me any suggestion to fix this issue.

Thanks in advance..
nalgonda
 
Posts: 1
Joined: Thu Feb 16, 2012 11:46 am

Re: High Stock External control for disable / enable zoomtyp

Postby hfrntt » Wed Feb 22, 2012 5:37 pm

The simplest way to do this is to use selection event (http://www.highcharts.com/ref/#chart-events--selection). In the doc you can read:
The default action for the selection event is to zoom the chart to the selected area. It can be prevented by calling event.preventDefault().

So inside the selection event you can simply check if the zoom should be disabled, if yes call "event.preventDefault()".
Slawek Kolodziej
Highcharts support team
hfrntt
 
Posts: 6394
Joined: Mon Aug 30, 2010 10:41 am


Return to Highstock Usage

Who is online

Users browsing this forum: No registered users and 1 guest