ProvideX V8.20 > Language Reference > 2. Directives
45
Format 5: Loading Data into a Chart
CHART LOAD ctl_id,strvar$[,ERR=stmtref]
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 ( = ); e.g.,
CHART LOAD 10,"100,200,300,400/150,250,350,450/"
This loads a chart with two data sets consisting of four points (or data elements).
CHART LOAD 10,"Last Year=100,200,300,400/This Year=150,250,350,450/"
This includes legend labels for the first example.
Format 6: Clearing Data from a Chart
CHART CLEAR ctl_id[,ERR=stmtref]
This clears the data values from the chart but not the titles and labels.
Format 7: Clearing Data & Titles from a Chart
CHART DELETE ctl_id[,ERR=stmtref]
This clears all of the data values and all of the titles from the chart.
Format 8: 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.
CHART FIND ctl_id,dataset,point,numvar[,ERR=stmtref]
The data is read from the chart and returned in numvar.
CHART FIND ctl_id,dataset,point,label$[,ERR=stmtref]
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:
CHART FIND 10,1,2,RETURN_VALUE
CHART FIND 10,1,0,LEGEND_LABEL_1$
CHART FIND 10,0,1,POINT_LABEL_1$
Format 9: Reading Selected Set from a Chart
CHART READ ctl_id, dataset,eom$[,ERR=stmtref]
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.