| Directives |
|
| Formats | 1.Define/Create:
CHART ctl_id,@(col,ln,wth,ht),[,ctrlopt] 2.Load: CHART LOAD ctl_id,strvar$[,ERR=stmtref] 3.Clear Data: CHART CLEAR ctl_id[,ERR=stmtref] 4.Clear Data & Titles: CHART DELETE ctl_id[,ERR=stmtref] 5.Enable/Disable: CHART {ENABLE | DISABLE} ctl_id[,ERR=stmtref] 6.Retrieve Value: CHART FIND ctl_id,dataset, point,{numvar | label$}[,ERR=stmtref] 7.Read Selected Set: CHART READ ctl_id, dataset,eom$[,ERR=stmtref] 8.Update Existing Values: CHART WRITE ctl_id,dataset,point,{data | label$}[,ERR=stmtref] 9.Hide/Show: CHART {HIDE | SHOW} ctl_id[,ERR=stmtref] 10.Remove: CHART REMOVE ctl_id[,ERR=stmtref]
|
||||||||||||||||||||||||||||||||
| Description | Use the CHART directive to create two and three dimensional chart illustrations in a graphical application. When defining the chart, you can select from several available chart types, including: Area, Bar, Column, Line, Pie, Ribbon, Scatter, and Stack. The chart type and visual look information is determined by the FMT= option. | ||||||||||||||||||||||||||||||||
| *Note* | Use of this feature is contingent on activation of the Charting Control Add-On. | ||||||||||||||||||||||||||||||||
| Chart Properties The Apostrophe Operator can be used with the unique logical identifier (ctl_id) to dynamically read and alter a wide variety of control attributes (properties) directly from the programming language. The list of properties available for manipulating a chart object are described in Control Object Properties, . |
|||||||||||||||||||||||||||||||||
| Format 1 | Creating a Chart
Use this format to create the chart. The value in ctl_id is a unique identifier that is used to generate a CTL value whenever the chart is selected and changed. |
||||||||||||||||||||||||||||||||
| Format 2 | Loading Data into a
Chart
Use this format to load chart data into a chart. The last character in strvar$ identifies the separator for the data set while the value defined by SEP= when the chart is created, is used to identify the different data points within each set. Legend labels can be specified as the first element in a dataset definition followed by an equal sign ( = ).
loads a chart with two data sets consisting of four points (or data elements).
includes legend labels for the first example. |
||||||||||||||||||||||||||||||||
| Format 3 | Clearing Data from a
Chart
This clears the data values from the chart but not the titles and labels. |
||||||||||||||||||||||||||||||||
| Format 4 | Clearing
Data & Titles from a Chart
This clears all of the data values and all of the titles from the chart. |
||||||||||||||||||||||||||||||||
| Format 5 | Enabling/Disabling a
Chart
If the mouse is clicked on a chart while it is enabled, then the program receives a CTL event based on the ctl_id of the chart. This does not occur when the chart is disabled. |
||||||||||||||||||||||||||||||||
| Format 6 | Retrieving Values from
a Chart CHART FIND is used to retrieve values from a chart based on the specified dataset and data point. The format is described below.
The data is read from the chart and returned in data$.
This format retrieves the label in label$. Legend labels are determined for a specified dataset when the point value is set to zero. Point labels are determined for a specified point when the dataset value is set to zero. The following example reads the value and label for the second point of the first dataset:
|
||||||||||||||||||||||||||||||||
| Format 7 | Reading Selected Set
from a Chart
Use CHART READ upon receiving a CTL notification that the control was selected with the mouse. The eom$ character will yield $01$ indicating that the dataset was selected by a mouse click. |
||||||||||||||||||||||||||||||||
| Format 8 | Updating Existing
Values in a Chart CHART WRITE is used to change existing values in a chart based on the specified dataset and data point.
The above format updates the data for an individual point.
The above format changes chart labels. Legend labels are updated for a specified dataset when the point value is set to zero. Point labels are updated for a specified point when the dataset value is zero. |
||||||||||||||||||||||||||||||||
| Format 9 | Hide/Show a Chart
With the CHART HIDE format, the chart remains active, but is not displayed. It is still accessible to program(s). Use the CHART SHOW to restore the user's display and access. |
||||||||||||||||||||||||||||||||
| Format 10 | Removing a Chart
Use this format to delete an entire chart. |
||||||||||||||||||||||||||||||||