DeleteSeries PowerScript function
Description
Deletes a series and its data values from a graph.
Controls
Graph controls in windows and user objects. Does not apply
to graphs within DataWindow objects (because their data comes directly
from the DataWindow).
Syntax
|
1 |
<span>controlname</span>.<span>DeleteSeries</span> ( <span>seriesname</span> ) |
|
Argument |
Description |
|---|---|
|
controlname |
The graph in which you want to delete |
|
seriesname |
A string whose value is the name of the |
Return Values
Integer. Returns 1 if it succeeds and
-1 if an error occurs. If any argument’s value is null, DeleteSeries returns null.
Usage
The series in a graph are numbered consecutively, in the order
they were added to the graph. When a series is deleted, the remaining
series are renumbered.
Examples
This script for the SelectionChanged event of a DropDownListBox
assumes that the list box lists the series in the graph gr_data.
When the user chooses an item, DeleteSeries deletes
the series from the graph and DeleteItem deletes
the name from the list box:
|
1 |
string ls_name |
|
1 |
ls_name = This.Text |
|
1 |
gr_data.<span>DeleteSeries</span>(ls_name) |
|
1 |
This.DeleteItem(This.FindItem(ls_name, 0)) |