Example: Simple Graph
Demonstrates basic graph features, including plotting data, charting data, and setting axis scales and cursors.
Description
This example demonstrates the difference between plotting data (as new data is plotted, previous data on the graph is deleted) and charting data (new data is appended to exisiting data rather than overwritting exisiting data). The example lets users plot or chart a first data set, an additional data set, or multiple data sets (in this case 3) at the same time.
Experiment with the Plot and Chart buttons to see the difference between plotting and charting. Press the Clear Graph button to remove exisiting data from the graph.
You can customize the X-axis scale and the cursor from the user interface. To change either the minimum or maximum value on the X-axis scale, modify the appropriate value and press the Set Minimum or Set Maximum button. Press the Set Minimum and Maximum button to modify both values at the same time. To change the cursor (the blue crosshair on the graph), modify the X and Y values and press Set Cursor.
Controls, Properties, Methods, and Events
This example demonstrates the following controls, properties, methods, and events:
AutoScaleNow, SetMinMax, Minimum, Maximum
Example Location
Samples\UI\Graph\Simple Graph