mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-30 11:40:23 +02:00
removed average count label on graph data points to reduce the label width
This commit is contained in:
@@ -275,15 +275,7 @@ public class GraphFragment extends Fragment implements FragmentUpdateListener {
|
||||
if (prefs.getBoolean("averageData", true) && !pointValues.isEmpty() && pointValues.peek().getX() == value_x) {
|
||||
PointValue prevValue = pointValues.pop();
|
||||
PointValue newValue = new PointValue(value_x, (prevValue.getY() + value_y) / 2.0f);
|
||||
|
||||
if (prevValue.getLabelAsChars() != null) {
|
||||
int avgCount = Character.getNumericValue(prevValue.getLabelAsChars()[prevValue.getLabelAsChars().length-3]) * 10 +
|
||||
Character.getNumericValue(prevValue.getLabelAsChars()[prevValue.getLabelAsChars().length-2]) + 1;
|
||||
|
||||
newValue.setLabel(String.format("Ø %.2f (%02d)", newValue.getY(), avgCount));
|
||||
} else {
|
||||
newValue.setLabel(String.format("Ø %.2f (%02d)", newValue.getY(), 2));
|
||||
}
|
||||
newValue.setLabel(String.format("Ø %.2f", newValue.getY()));
|
||||
|
||||
pointValues.push(newValue);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user