ObjectAtPointerSeries  ResetDataColors

Chapter 10: Methods for Graphs in the DataWindow Control

Reset

Description

Deletes the data, the categories, or the series from a graph.

Reset is for graphs within a DataWindow object with an external data source. It does not apply to other graphs in DataWindow objects because their data comes directly from the DataWindow.

Syntax

integer dwcontrol.Reset ( grResetType graphresettype )

Argument

Description

dwcontrol

A reference to the DataWindow control or DataStore containing the graph.

graphresettype

A value of the grResetType enumerated datatype specifying whether you want to delete only data values or all series and all data values:

  • All! — Delete all series, categories, and data in dwcontrol.

  • Category! — Delete categories and data in dwcontrol.

  • Data! — Delete data in dwcontrol.

  • Series! — Delete the series and data in dwcontrol.

Returns

Returns 1 if it succeeds and -1 if an error occurs. If any argument’s value is NULL, Reset returns NULL. The return value is usually not used.

Usage

Use Reset to clear the data in a graph before you add new data.

Examples

Example 1

This statement deletes the series and data, but leaves the categories, in the graph gr_product_data in the DataWindow dw_prod. The DataWindow object has an external data source:

dw_prod.Reset("gr_product_data", Series!)





Copyright © 2004. Sybase Inc. All rights reserved. ResetDataColors

View this book as PDF