-
Notifications
You must be signed in to change notification settings - Fork 809
Open
Description
In GridLabelRenderer.adjustHorizontal the call to humanRound is hardwired to false for the second argument. This means that the increments between labels will always round down. That leads to data being truncated from the graph.
An easy way to see this is a one-line modification of the all-XML example given here. Replace the last line of
<com.jjoe64.graphview.helper.GraphViewXML
android:layout_width="match_parent"
android:layout_height="100dip"
app:seriesData="0=5;2=5;3=0;4=2" />
with
app:seriesData="100=5;150=5;200=0;250=2" />
and you will see that the data, which runs from 100 to 250, is truncated at 180, hiding two of the four points.

There are several ways to address this I suppose, including
- Just hardwire the value to true. This may waste a little screen space, but should not hide data.
- Make the value user-configurable.
- Adjust both the step size and number of labels for a possibly better compromise.
Metadata
Metadata
Assignees
Labels
No labels