projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2f44fa
)
altosuilib: Allow for unitless axes in graphs
author
Keith Packard
<keithp@keithp.com>
Thu, 10 Jul 2014 23:19:52 +0000
(16:19 -0700)
committer
Keith Packard
<keithp@keithp.com>
Thu, 10 Jul 2014 23:19:52 +0000
(16:19 -0700)
DOP values have no units.
Signed-off-by: Keith Packard <keithp@keithp.com>
altosuilib/AltosUIAxis.java
patch
|
blob
|
history
diff --git
a/altosuilib/AltosUIAxis.java
b/altosuilib/AltosUIAxis.java
index 1b5b92053cace56d7d0e9e34431e28c7fc7fec2e..9e98ddb77bb7cade58e5132d27352eecbe17387f 100644
(file)
--- a/
altosuilib/AltosUIAxis.java
+++ b/
altosuilib/AltosUIAxis.java
@@
-48,7
+48,11
@@
public class AltosUIAxis extends NumberAxis {
public final static int axis_default = axis_include_zero;
public void set_units() {
- setLabel(String.format("%s (%s)", label, units.show_units()));
+ String u = units.show_units();
+ if (u != null)
+ setLabel(String.format("%s (%s)", label, u));
+ else
+ setLabel(label);
}
public void set_enable(boolean enable) {