diogobernardino / williamchart

Android Library to rapidly develop attractive and insightful charts in android applications.
5.1k stars 800 forks source link

Y axis showing incorrect data #202

Closed Polyterative closed 7 years ago

Polyterative commented 7 years ago

I have a problem, when setting chartView.setYLabels(AxisController.LabelPosition.OUTSIDE); my Y axis shows all scale data, in addition to my desired values. In this case I have data from 1 to 100. The chart shows every number on Y (1.2.3.4....) Screenshot

How can I show only the correct value?

I need to quantize my Y values. I only want to show 3 or 2 of them (for example min and max Y values).

Tried using different array sizes (for labels and data), but library returns error: Arrays size doesn't match.

diogobernardino commented 7 years ago

With setAxisBorderValues method you can define not just the min and max axis value but also the step between them.

Polyterative commented 7 years ago

Works perfectly, thank you so much! Leaving a screenshot of final result for future people passing by here

Used chartView.setAxisBorderValues(0, 100,20);