I'm using LineChartView to draw line charts in our application. The newest requirement is that the chart displays only 4 records at once, so the X-zoom must be limited to 4 entries. Is this achievable using this library without doing any hacky stuff? I'd rather avoid calculating zoom manually.
Thanks in advance!
If I understand correctly, you want to see only 4 values at a time. This can be accomplished by using:
chartView.setVisibleXRange(minXRange: 4.0, maxXRange: 4.0)
The chart will be scrollable to the sides. The scroll can be turned off, but then only the 4 first values will be viewable:
chartView.isUserInteractionEnabled = false