Returns the specified value of a series in the chart object.

float object->GetSeriesValue( int index, int valueindex ) 

Arguments

object
Required. A Chart object.
index
Required. An integer value that specifies the zero-based index of the series in the chart object.
valueindex
Required. An integer value that specifies the zero-based index of the value in the series specified by index.

Return Value

A floating-point number containing the data value spedified by valueindex in the data series specified by index.

Remarks

If the index argument refers to a series that does not exist in the chart object, the GetSeriesValue method raises an invalid series index error.

If the valueindex argument refers to a data value that does not exist in the specified series, the GetSeriesValue method raises an out of bounds error.

PHP Code Sample

The following PHP code illustrates use of the GetSeriesValue method.

$chart->SetDataFromQuery();

// Retrieves the number of series stored in the chart object 
$n_series= $chart->GetSeriesCount();
$n_categories= $chart->GetValuesCount();

if( $n_series == 0 )
  print("No series available<br>");
else
  {
  // Enumerate the series stored in the chart object 
  for( $i= 0; $i < $n_series; ++$i )
    for( $j= 0; $j < $n_series; ++$j )
      print("Series[" . $i . "][" . $j . "]=" . $chart->GetSeriesValue($i, $j) . "<br>");
  }

See Also

GetSeriesCount Method | SetSeriesValuesFromString Method | SetSeriesValuesFromArray Method

Applies To: Chart Object