DeleteSeries

Description

Deletes a series and its data values from a graph.

Applies to

Graph controls in windows and user objects. Does not apply to graphs within DataWindow objects (because their data comes directly from the DataWindow).

Syntax

controlname.DeleteSeries ( seriesname )

Argument

Description

controlname

The graph in which you want to delete a series

seriesname

A string whose value is the name of the series you want to delete from controlname

Returns

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

Example 1

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:

string ls_name

ls_name = This.Text

gr_data.DeleteSeries(ls_name)

This.DeleteItem(This.FindItem(ls_name, 0))

See also