ChartsOrg / Charts

Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart.
Apache License 2.0
27.61k stars 6k forks source link

how to scroll fixed amount of bar when scrolling the bar chart? (CHARTS SWIFT) #3100

Open Rumy-hasan opened 6 years ago

Rumy-hasan commented 6 years ago

When I first presenting my chart I Write this.

            chartView.data = data
            chartView.setVisibleXRangeMaximum(4)
            chartView.moveViewToX(Double(step.count - 5))

So It present me perfectly with the last 4 bars.But when I start to scrolling left to right It does not show me the previous 4 bar. Instead of it present me with some remaining bar and some previous bar.So How can I present it with next 4 bar or previous 4 bar according to our scroll.

bohdansasko commented 6 years ago

Thanks!