Namespace: GlobFX.SwiffChartGenerator
Assembly: GlobFX.SwiffChartGenerator (in GlobFX.SwiffChartGenerator.dll)
Returns the specified value of a series in the chart object.
Public Function GetSeriesValue( index As Integer, valueindex As Integer ) As Double
public double GetSeriesValue( int index, int valueindex );
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.
The following code illustrates use of the GetSeriesValue method.
chart.SetDataFromTxtFile("C:\\myData.txt") ' Retrieves the number of series stored in the chart object Dim n_series As Integer = chart.SeriesCount Dim n_categories As Integer = chart.ValuesCount If n_series = 0 Then Me.Response.Write( "No series available<br>" ) Else ' Enumerate the series stored in the chart object Dim i As Integer Dim j As Integer For i = 0 To n_series - 1 For j = 0 To n_categories - 1 Me.Response.Write( "Series[" + i + "][" + j + "]=" + chart.GetSeriesValue(i,j) + "<br>" ) Next Next End If
chart.SetDataFromTxtFile("C:\\myData.txt"); // Retrieves the number of series stored in the chart object int n_series= chart.SeriesCount; int n_categories= chart.ValuesCount; if( n_series == 0 ) this.Response.Write("No series available<br>"); else { // Enumerate the series stored in the chart object for( int i= 0; i < n_series; ++i ) for( int j= 0; j < n_categories; ++j ) this.Response.Write("Series[" + i + "][" + j + "]=" + chart.GetSeriesValue(i,j) + "<br>"); }
SeriesCount Property | SetSeriesValuesFromString Method | SetSeriesValuesFromArray Method
Applies To: Chart Object