diff options
| author | Keith Packard <keithp@keithp.com> | 2017-10-04 13:43:45 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2017-10-04 13:43:45 -0700 |
| commit | 2f779d318753b73463f7166977453ab5533e5921 (patch) | |
| tree | 35c62d27a36ce90a3e5789cf9bbc3b9e85e197af /altosuilib/AltosUIGraph.java | |
| parent | 730ee7bf91f607ece42c010a10c53d0013492b96 (diff) | |
altosuilib: Add 'show marker' button to graphs
Provides a marker at each actual data point which can be useful for
sparse data sets like telemetry with poor reception.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosuilib/AltosUIGraph.java')
| -rw-r--r-- | altosuilib/AltosUIGraph.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/altosuilib/AltosUIGraph.java b/altosuilib/AltosUIGraph.java index efc3d493..6328d40a 100644 --- a/altosuilib/AltosUIGraph.java +++ b/altosuilib/AltosUIGraph.java @@ -36,7 +36,7 @@ import org.jfree.chart.labels.*; import org.jfree.data.xy.*; import org.jfree.data.*; -public class AltosUIGraph implements AltosUnitsListener { +public class AltosUIGraph implements AltosUnitsListener, AltosShapeListener { XYPlot plot; JFreeChart chart; @@ -99,6 +99,11 @@ public class AltosUIGraph implements AltosUnitsListener { units_changed(false); } + public void set_shapes_visible(boolean visible) { + for (AltosUITimeSeries s : series) + s.set_shapes_visible(visible); + } + public void setName (String name) { chart.setTitle(name); } @@ -127,6 +132,8 @@ public class AltosUIGraph implements AltosUnitsListener { this.series = null; this.axis_index = 0; + enable.register_shape_listener(this); + axes_added = new Hashtable<Integer,Boolean>(); xAxis = new NumberAxis("Time (s)"); |
