@@ -19,6 +19,7 @@ public class Window extends JFrame
19
19
private static final long serialVersionUID = 1L ;
20
20
final XYSeries process_output ;
21
21
final XYSeries process_input ;
22
+ final XYSeries process_setpoint ;
22
23
final XYSeriesCollection collectionData ;
23
24
final JFreeChart display ;
24
25
public JTextField txt_port ;
@@ -81,21 +82,24 @@ public Window()
81
82
this .getContentPane ().add (mainPanel , BorderLayout .EAST );
82
83
83
84
// Setup the Chart panel
84
- process_input = new XYSeries ("Process Input" );
85
- process_output = new XYSeries ("Process Output" );
85
+ process_input = new XYSeries ("Process Input" );
86
+ process_output = new XYSeries ("Process Output" );
87
+ process_setpoint = new XYSeries ("Setpoint" );
86
88
process_input .clear ();
87
89
process_output .clear ();
90
+ process_setpoint .clear ();
88
91
collectionData = new XYSeriesCollection ();
89
92
collectionData .addSeries (process_input );
90
93
collectionData .addSeries (process_output );
94
+ collectionData .addSeries (process_setpoint );
91
95
display = ChartFactory .createXYLineChart ("Realtime Process Dynamics" ,
92
- "Time" ,
93
- "Amplitude" ,
94
- collectionData ,
95
- PlotOrientation .VERTICAL ,
96
- true ,
97
- true ,
98
- false );
96
+ "Time" ,
97
+ "Amplitude" ,
98
+ collectionData ,
99
+ PlotOrientation .VERTICAL ,
100
+ true ,
101
+ true ,
102
+ false );
99
103
JPanel rt_panel = new ChartPanel (display );
100
104
this .getContentPane ().add (rt_panel , BorderLayout .CENTER );
101
105
this .setVisible (true );
0 commit comments