_______________________________________________________
STRIPCHART Widget
Displays data in a two-dimensional scrolling graph
_______________________________________________________
Legal Usage Level-0 Widget: Yes
Parent to: None
Child of: PANEL
Example Image
Example Program
three traces, and traces a pattern of triangle waves similar to the display shown
above.
See the following programs for other examples using the STRIPCHART widget:
Attributes
Remarks
The STRIPCHART widget displays data in a two-dimensional scrolling graph. It models a physical stripchart.
The STRIPCHART widget allows you to trace up to 100 different streams of values on a scrolling graphics display. You can set ranges and tick styles, labels and numeric formats along both the X and Y axes, and different colors for the traces. The STRIPCHART widget has three classes of attributes:
·
|
Those that apply to the entire widget ("global" attributes)
|
·
|
Those that apply to either the X or Y axis
|
·
|
Those that apply to an individual trace
|
Attributes that apply to the entire widget are ORIENTATION (VERTICAL or HORIZONTAL), TRACE BACKGROUND (sets the PEN color of the trace display area) and TRACE COUNT which gives the number of traces that you want to display.
MINIMUM SCROLL tells how much the traces scrolling across the STRIPCHART display will scroll at one time, in terms of a percent of the X-axis. A small value (for example, one that defines one pixel of the width) will give a very smooth scroll, but usually is not useful. For example, if your X-axis range is 10, and you perform updates in increments of 1, you should set MINIMUM SCROLL to 10 (percent).
You can write each trace independently, but it is usually more practical to set up the STRIPCHART so that you can write a single X value (using the POINT LOCATION attribute) and then update all the traces at one time using an array (using the VALUES attribute). The SHARED X attribute is set to 1 to allow updating all the traces in parallel.
Use the CURRENT AXIS attribute to select one of the two STRIPCHART display axes, X or Y. When an axis is selected, you can define its ORIGIN and RANGE (if the axis is LOGARITHMIC-scaled), an AXIS LABEL, and various formats for TICK SPACING and appearance, various NUMBER FORMATs (AUTOmatic, FIXED, ENGINEERING, and SCIENTIFIC, and time formats such as CLOCK12).
If you do not want to scale the axes, set the axes to AUTOSCALE and STRIPCHART will adjust the axes to the data displayed. If you do not want to set numbering and tickmarks, set SHOW NUMBERING and SHOW TICKS to 0
The SHOW GRID attribute allows a grid to be displayed on the graphic surface. The MARKER attribute allows "markers" to be displayed on one or two traces. The markers can be moved with the mouse and interrogated for the trace values.
MARKER can be set to NONE (no markers), ONE marker, TWO markers, DELTA (difference between X and Y marker values), and RATIO (ratio of marker values). When markers are turned on, the appropriate marker values are displayed at the bottom of the STRIPCHART.
Traces to be marked are designated with the attributes MARKER1 TRACE and MARKER2 TRACE. The positions of the markers on the trace can be set or queried using the attributes MARKER1 X / MARKER1 Y, and MARKER2 X / MARKER2 Y. You can trap marker movements with the MARKER1 MOVED and MARKER2 MOVED events.
Events
Events for the STRIPCHART widget are:
·
|
MARKER1 MOVED, MARKER2 MOVED
|
MARKER1 MOVED, MARKER2 MOVED
This event is generated when a marker is moved.
SCROLLED
This event is generated when the operator scrolls the STRIPCHART with the internal scrollbar. That is, when the mouse button is released after moving the scrollbar slider or after moving the scrollbar slider with the arrow keys from the keyboard.
SYSTEM MENU
This event is generated when the operator selects items from the SYSTEM MENU.