Returns the specified Y value of a series in the chart object.
float object->GetSeriesYValue( int index, int valueindex )
If the index argument refers to a series that does not exist in the chart object, the GetSeriesYValue method raises an invalid series index error.
If the valueindex argument refers to a Y value that does not exist in the specified series, the GetSeriesYValue method raises an out of bounds error.
The following PHP code illustrates use of the GetSeriesYValue method.
// Set the series $chart->SetDataFromQuery(); // Retrieve 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" ); else { // Enumerate the series stored in the chart object for( $i = 0; $i < $n_series; ++$i ) { // Enumerate the XY points of the series for( $j = 0; $j < $n_categories; ++$j ) { $str= "Series[$i][$j]="; $str .= "(" . $chart->GetSeriesXValue($i, $j); $str .= ","; $str .= $chart->GetSeriesYValue($i, $j) . ")<br>"; print( $str ); } } }
GetSeriesXValue Method | GetSeriesCount Method | SetSeriesYValuesFromString Method | SetSeriesYValuesFromArray Method
Applies To: Chart Object