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 84320be3503fbee52709945fed765c15cbca3207..5aa127bb4d9164a72d99cc0aef6e554f72aac70e 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) {