Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't scroll over amcharts chart on mobile

So I have a chart that spans 100% when on mobile but when trying to scroll the screen by touching the graph and swiping it simply triggers an event instead of scrolling. For instance if I try to scroll over a pie chart it will bring up the bubble of the pie slice.

Is there an event I could disable to alleviate this issue?

like image 595
giovanMusk Avatar asked Nov 14 '14 21:11

giovanMusk


2 Answers

The fix was to set an option in the chart

"panEventsEnabled": false

like image 90
giovanMusk Avatar answered Oct 26 '22 19:10

giovanMusk


For line graphs I had to use a combination of the two below:

"panEventsEnabled": false

From http://docs.amcharts.com/javascriptstockchart/PanelsSettings#panEventsEnabled

and

"pan":true

From http://docs.amcharts.com/3/javascriptcharts/ChartCursor#pan

Hope it helps!

like image 34
Ben Taliadoros Avatar answered Oct 26 '22 19:10

Ben Taliadoros