micropeak: Demonstrate how to hide various parts of the graph
authorKeith Packard <keithp@keithp.com>
Fri, 11 Jan 2013 05:38:15 +0000 (21:38 -0800)
committerKeith Packard <keithp@keithp.com>
Fri, 11 Jan 2013 05:48:31 +0000 (21:48 -0800)
This just shows how to disable a series and axis; it's not used here.

Signed-off-by: Keith Packard <keithp@keithp.com>
micropeak/MicroGraph.java

index 84320be..5aa127b 100644 (file)
@@ -54,6 +54,11 @@ class MicroSeries extends XYSeries {
                renderer.setBaseToolTipGenerator(ttg);
        }
 
+       void set_enable(boolean enable) {
+               renderer.setSeriesVisible(0, enable);
+               axis.setVisible(enable);
+       }
+
        public MicroSeries (String label, String units, Color color) {
                super(label);
                this.label = label;
@@ -116,6 +121,7 @@ public class MicroGraph implements AltosUnitsListener {
                                accelSeries.add(point.time, AltosConvert.accel.value(point.accel));
                        }
                }
+//             accelSeries.set_enable(false);
        }
 
        public void setName (String name) {