summaryrefslogtreecommitdiff
path: root/altosuilib/AltosUISeries.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-05-10 22:46:58 -0700
committerKeith Packard <keithp@keithp.com>2016-05-11 23:22:15 -0700
commit60f4d69592c440ab7bb67a04f4c07fc7279d2c20 (patch)
tree8edfca4a59b5d15d251607075453aeab1a9f376f /altosuilib/AltosUISeries.java
parent6a6da23335e6e5864387c7a22946f80f51056a4f (diff)
altoslib: Switch distance from m/ft to km/miles for large values
This adds lots of infrastructure to deal with making the unit used depend on the value itself, and then uses it only for distances. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosuilib/AltosUISeries.java')
-rw-r--r--altosuilib/AltosUISeries.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/altosuilib/AltosUISeries.java b/altosuilib/AltosUISeries.java
index b16f046b..c9401be0 100644
--- a/altosuilib/AltosUISeries.java
+++ b/altosuilib/AltosUISeries.java
@@ -69,7 +69,7 @@ public class AltosUISeries extends XYSeries implements AltosUIGrapher {
String example = units.graph_format(7);
ttg = new StandardXYToolTipGenerator(String.format("{1}s: {2}%s ({0})",
- units.show_units()),
+ units.graph_units()),
new java.text.DecimalFormat(time_example),
new java.text.DecimalFormat(example));
renderer.setBaseToolTipGenerator(ttg);
@@ -85,7 +85,7 @@ public class AltosUISeries extends XYSeries implements AltosUIGrapher {
public void add(AltosUIDataPoint dataPoint) {
try {
- super.add(dataPoint.x(), units.value(dataPoint.y(fetch)));
+ super.add(dataPoint.x(), units.graph_value(dataPoint.y(fetch)));
} catch (AltosUIDataMissing dm) {
}
}