Apexcharts.js: Zoom with mouse out of graph

Created on 6 May 2019  路  6Comments  路  Source: apexcharts/apexcharts.js

Hello all,

I'm writing you to ask, how to do when I want to zoom on the right/left borders? It's very hard to select the last values...

screenshot-cloud le-vert net-2019 05 06-10-08-30(https://cloud.le-vert.net/s/oGdRRcXSsgpxdQJ)

How I can do to keep the right click event enabled if the mouse is out of the graph ?
And then, zoom on the last values ?

Thanks for your help and thanks for apexcharts !

Benoit.

bug high-priority

Most helpful comment

@haroflow thanks
I will check out your solution.

All 6 comments

Yeah, that seems like a bug.
I will check the mouse-move event to determine if the user was zooming, and based on that, zoom in to the outermost values.
Thanks for reporting the bug.

Thanks a lot for your work !
Now I will try to keep the zoom level when data has been refreshed !

@junedchhipa @bencultureinfo Hi! I needed this fixed as well...

I made some changes and it's working for my use case, if anyone would like to take a look and help implement it officially here's the diff: https://gist.github.com/haroflow/ace6fe4a7aea490a1101cc8f6ea8ce08

This fixes clicking and dragging to both right and left sides, but introduces an error (that's why there is a null check on there). Not sure why I put capture:true, probably not necessary. When I have more time i'll take a better look at it.

Thanks to everyone!

@haroflow thanks
I will check out your solution.

Works for us, thank you very much!

Thanks a lot for your dev !! It is ok !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

drew-dulgar picture drew-dulgar  路  3Comments

ordago picture ordago  路  3Comments

rudeayelo picture rudeayelo  路  3Comments

georgehardy picture georgehardy  路  3Comments

felixalguzman picture felixalguzman  路  3Comments