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

    object.GetSeriesYValue index, 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 Y value in the series specified by index.

#### Return Value

A floating-point number containing the Y 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 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.

- index must be superior or equal to 0.
- index must refer to an existing series.
- valueindex must be superior or equal to 0.
- valueindex must be strictly inferior to GetValuesCount.

#### VBScript Code Sample

The following VBScript 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 Then
      Response.Write "No series available"
    Else
      'Enumerate the series stored in the chart object
      For i = 0 to (n_series-1)
        'Enumerate the XY points of the series
        For j = 0 to (n_categories-1)
          str= "Series[" & i & "][" & j & "]="
          str= str & "(" & chart.GetSeriesXValue(i, j)
          str= str & ","
          str= str & chart.GetSeriesYValue(i, j) & ")<br>"
          Response.Write str
        Next
      Next
    End If

#### See Also

GetSeriesXValue Method | GetSeriesCount Method | SetSeriesYValuesFromString Method | SetSeriesYValuesFromArray Method

Applies To: Chart Object