mirror of
https://github.com/oliexdev/openScale.git
synced 2025-09-01 20:33:31 +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) {
|
if (prefs.getBoolean("averageData", true) && !pointValues.isEmpty() && pointValues.peek().getX() == value_x) {
|
||||||
PointValue prevValue = pointValues.pop();
|
PointValue prevValue = pointValues.pop();
|
||||||
PointValue newValue = new PointValue(value_x, (prevValue.getY() + value_y) / 2.0f);
|
PointValue newValue = new PointValue(value_x, (prevValue.getY() + value_y) / 2.0f);
|
||||||
|
newValue.setLabel(String.format("Ø %.2f", newValue.getY()));
|
||||||
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));
|
|
||||||
}
|
|
||||||
|
|
||||||
pointValues.push(newValue);
|
pointValues.push(newValue);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user