GetSelectedSeries (Dundas Chart Server Control 1.0)

From Dundas

GetSelectedSeries

Overview | Properties | Methods

Use this method to determine which data series the user selected (zero-based).  Note that pie charts only use one data series.

Syntax

long = PieChartObject.GetSelectedSeries()

Remarks

GetSelectedSeries is zero-based, and will:

  • return -999 if the user clicked on the collected data element.

  • return a negative number if the user clicked anywhere except a data element or the legend item that corresponds to a pie slice.

  • always return zero (0) if the user selected an actual data element (i.e. pie slice).

Even though pie charts have only one data series you should still call this method to make sure an actual slice or legend item was selected!

Call this method ONLY WHEN you have successfully called the Select method inside the page which is handling the item selection (as specified by the SRC attribute of the <A> tag immediately preceding the server-side chart image tag). The return value will be the data element that the user clicked on inside of the chart server-side imagemap (<A HREF SRC="PageToHandleSelectedItem.asp"><IMG IsMap SRC="MakeJpeg.asp"></A>).

Important: Even though the page which handles the selection (i.e the page which has the GetSelectedSeries call) does not output a jpeg we MUST reproduce the exact same chart which is created by the page within the <IMG> tag (the page which outputs the jpeg via SendJPEG). In order to guarantee that the exact same chart is reproduced we highly recommend using a server-side include for the code which creates the chart (starting from the CreateObject call all the way to setting the Chart object to Nothing).

For sample source on this refer to the Tutorial: Drilldown and Selection of Data Elements.

See Also: GetSelectedPosition | Select | SetCollectedLimit | SetCollectedProp