Could you ask your question more precisely? You want to detect whether a zoom was caused by dragging mouse? For example, if we click the left mouse button, drag mouse and release the mouse button - then zoom is performed and you want to return true. But when we zoom differently, for example by setting extremes (not dragging mouse), you want to return false?
That' s exactly what I need:
" if we click the left mouse button, drag mouse and release the mouse button - then zoom is performed and you want to return true. But when we zoom differently, for example by setting extremes (not dragging mouse), you want to return false"
This is an example of how can you do this. You can wrap Highcharts.Pointer.prototype.dragStart function that fires when we start dragging. Then, inside that function, you can add to the chart object an extra info (chart.isZoomedByDrag = true;) that zoom was performed by dragging. I created a jsFiddle example for you: https://jsfiddle.net/BlackLabel/w5rme8yp/
That seems to be the way. My zoom is in the X Axis only, when changing the navigator bar width it identify the action as a mouse dragging mouse also. Comparing the mouseY to detect if it's clicking outside the Plot Chart area solve de problem. Thanks for your code.
Just a last question, what is the best way to detect the highest Y point that is clickable inside the Plot Area (identified by the red line in the picture)? In my case it's always a fixed value but just in case the chart may have a different size that could be dynamic.
Attachments
Highstock_max_y_px.png (85.27 KiB) Viewed 2645 times
Ok, unless there is an easy way to get the highest y point after creating the chart, when building the chart this value may be calculated,. it's solved.
Regards
I am not sure what exactly are you looking for, but you can easily find plot area's height, you can also easily find the coordinates of the point that has the biggest y value etc.
If you need anything, let me know.