Reputation: 5
So I'm using MPAndroidChart to draw a linechart using data from a Firebase Real-time Database.
This is how it shows:
The first point is 2100 and the rest of the points are around 5-6, but because is not scaled, it shows them at 0. How can I scale the chart to show them correctly or can I plot the last 10 points?
Upvotes: 0
Views: 528
Reputation: 454
From what you write, I understand that all the points are displayed correctly, but the chart is not very useful because of the outlier. You could zoom in to the lower part of the chart, e.g.:
chart.zoom(1f, 10f, 0f, 0f)
This zooms in by a factor of 10 on the Y axis and leaves the X axis as is.
Another solution would be a logarithmic scale, but this seems not to be supported by MpAndroidChart.
Upvotes: 0