Namespace: GlobFX.SwiffChartGenerator
Assembly: GlobFX.SwiffChartGenerator (in GlobFX.SwiffChartGenerator.dll)
Returns the specified X value of a series in the chart object (for XY-Scatter and XY-Curves).
Public Function GetSeriesXValue( index As Integer, valueindex As Integer ) As Double
public double GetSeriesXValue( int index, int valueindex );
If the index argument refers to a series that does not exist in the chart object, the GetSeriesXValue method raises an invalid series index error.
If the valueindex argument refers to a X value that does not exist in the specified series, the GetSeriesXValue method raises an out of bounds error.
Note: This method is available when manipulating XY data series required for displaying XY-Curves and XY-Scatter. Note that the Chart type (ie: bar, column, line, etc.) is defined in the Swiff Chart style file (.scs) which must be loaded via the LoadStyle method.
The following code illustrates use of the GetSeriesXValue method.
' Set the series
chart.SetDataFromTxtFile("C:\\myData.txt")
' Retrieve 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
' Enumerate the XY points of the series
For j = 0 To n_categories - 1
Dim str As String
str= "Series[" + i + "][" + j + "]="
str= str + "(" + chart.GetSeriesXValue(i,j)
str= str + ","
str= str + chart.GetSeriesYValue(i,j) + ")<br>"
Me.Response.Write( str )
Next
Next
End If
// Set the series
chart.SetDataFromTxtFile("C:\\myData.txt");
// Retrieve 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 )
{
// Enumerate the XY points of the series
for( int j = 0; j < n_categories; ++j )
{
string str= "Series[" + i + "][" + j + "]=";
str= str + "(" + chart.GetSeriesXValue(i,j);
str= str + ",";
str= str + chart.GetSeriesYValue(i,j) + ")<br>";
this.Response.Write( str );
}
}
}
GetSeriesYValue Method | SeriesCount Property | SetSeriesXValuesFromString Method | SetSeriesXValuesFromArray Method
Applies To: Chart Object