Comments (11)
At this moment there's no way to do that, I'm afraid.
That said, I can see how it might be useful. We will consider it.
Leaving this open until we reach a decision. However, I can't provide an ETA for it. Sorry.
from amcharts5.
I managed to implement it as follows, but with bugs. You need to try to zoom the map using ctrl + wheel and hover at the yellow dots. Apparently at some point, the cursor is above the tooltip and browser zoom occurs
https://codepen.io/nizhnikovskiy/pen/eYEvaLW
from amcharts5.
I'd use this feature.
from amcharts5.
@nizhnikovskiy Thank you for posting that example. I was able to adapt it to work on my XY chart. I didn't notice any bugs related to scrolling while hovering over a tooltip on the XY chart.
In my case I'm using a 'busy' overlay div to gray out the chart (very similar to the no-scroll div in your example). When the user ctrl+scroll while the chart is busy (ie the busy div is visible) it zooms the browser. I tried to catch and prevent this but my first couple attempts didn't work so I just switched to shift+scroll to zoom the chart.
Thanks again for sharing your example.
from amcharts5.
You guys might find this useful:
https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Control_scroll
https://www.amcharts.com/docs/v5/charts/map-chart/map-pan-zoom/#Control_scroll
from amcharts5.
Hey guys, quick update. I updated the above sections to include option to show Google-like overlay with a message informing user they need to use CTRL to zoom:
Hope you find it useful.
from amcharts5.
In your example this works https://codepen.io/team/amcharts/pen/vYJPYbZ not quite right. It works by
tracking a Ctrl/Meta button, but this key can be pressed when the browser is out of focus, so JS won't catch this event. As an option, we can check if a Ctrl/Meta button is pressed in a wheel event, but then it's impossible to set a wheel property of the map correctly and enable/disable zoom of the map.
from amcharts5.
Yeah, agreed. It will not work reliably in iframe (unless you click on it), but should be good to go on regular pages.
We might consider adding a setting which would disable page scroll only if ctrl key is down, even if element is "wheelable".
from amcharts5.
Ok, thanks. As an option, you can allow/disallow wheel of map according to condition specified in a some callback. This will add more flexibility
from amcharts5.
That's actually a pretty good idea. We'll consider it. Thanks.
from amcharts5.
We've just released 5.0.13 which does not cancel wheel event, so we more options to set up our own wheel logic.
The following docs have been updated to reflect that:
https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Control_scroll
https://www.amcharts.com/docs/v5/charts/map-chart/map-pan-zoom/#Control_scroll
from amcharts5.
Related Issues (20)
- Make xAxis stickyBottom HOT 5
- Bug tooltip outside the chartContainer HOT 1
- Zoomable chart with synced axes HOT 1
- Nonce does not work with StockChart HOT 2
- adding connect : false results in the grouped series disappearing upon zooming. HOT 2
- States not setting up for each column in columnSeries HOT 1
- Facing issues with series.data.setAll() HOT 4
- Add current volume label to stock chart HOT 2
- Hierarchy charts - Tree Map - Data processor will work for one level ? HOT 3
- Data point possible accessibilities HOT 6
- Flickering effect occurring while disposing series to add new series with new data HOT 2
- Adding button with tooltip of valueAxis stock chart HOT 4
- Increase the sensitivity of the panining AxisRendererY HOT 1
- Disable PanY auto resetting for valueAxis amcharts Stock HOT 2
- Can we add custom drawing tool in the same way as we add custom indicators HOT 3
- Chart specific possible accessibilities HOT 7
- Column series getting clustered after adding more data HOT 8
- Legend label oversizedBehaviour without maxWidth HOT 4
- Can't add tooltip on hover on X axis item HOT 3
- minBulletDistance not working for a Gantt chart with CategoryAxis and DateAxis HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amcharts5.