ivnsch / SwiftCharts

Easy to use and highly customizable charts library for iOS
Apache License 2.0
2.53k stars 410 forks source link

Enable Pan without Zooming in Area Chart #348

Closed smit-yash closed 6 years ago

smit-yash commented 6 years ago

I am trying to implement an Area chart using the example.

The issue that I am facing is that if there are a lot of values in x-axis, then the x-axis values start overlapping each other.

So, to fix this, I implemented this graph inside a UIScrollView and set it's content size according to the number of values in x-axis. Now, the graph is looking fine with all the x-axis labels at a certain distance from each other.

But, now the problem is that, even after placing the chart inside a UIScrollView, it is not scrolling.

I have even tried setting the ChartSettingsWithPanZoom but still it is not scrolling.

I noticed in the example that if we zoom the graph once, then the panning is enabled. I want to do it without zooming the graph.

Thanking in advance for the help.