Namespace: GlobFX.SwiffChartGenerator
Assembly: GlobFX.SwiffChartGenerator (in GlobFX.SwiffChartGenerator.dll)

Set series Z values (bubble sizes) from data encoded in a separator-delimited string (for Bubble charts).

Visual Basic
Public Sub SetSeriesZValuesFromString( index As Integer, values As String )
C#
public void SetSeriesZValuesFromString( int index, string values );

Arguments

index
An integer value that specifies the zero-based index of the series in the chart object.
values
A string that specifies the Z (or Size) data (see SetSeparators).

Remarks

Note: This method is available when manipulating Bubble data series required for displaying Bubble charts. Note that the Chart type (bubble, bar, column, line, etc) is defined in the Swiff Chart style file (.scs) which must be loaded via the LoadStyle method.

You can set the Z values of a specified series in a chart with data encoded in a string (i.e. the values argument). The string must be formatted as a list of numerical values, two consecutive values must be separated by a separator character that can be specified with the SetSeparators method.

Here is an example of series Z values encoded in a string with the character ";" as separator.

myEncodedString= "456;478;314;125;265"

The string argument values is parsed by the chart object according to the separator characters specified to the chart object (see the SetSeparators method for specifying separator characters and rules).

The ";" character is the default separator character.

If the index argument refers to a series that does not exist in the chart object, the series is created.

Sample Code

The following code shows how to store the XY and Sizes values of the table below using the SetSeriesZValuesFromArray method. This table has one series named "Production". This series contains independant XY and Sizes values.

Production
X
Y
Bubble Size (Z)
4.5
12
456
1.2
7.5
478
2.5
11.3
314
2.9
9.2
125
1.8
5.3
265
  

Visual Basic
' Let's build the series values strings with ";" as separator
Dim str_x As String = "4.5;1.2;2.5;2.9;1.8"
Dim str_y As String = "12;7.5;11.3;9.2;5.3"
Dim str_z As String = "456;478;314;125;265"

' Set the series caption
chart.SetSeriesCaption( 0, "Production" )

' Fill the series with XY values stored in the str variables
chart.SetSeriesXValuesFromString( 0, str_x )
chart.SetSeriesYValuesFromString( 0, str_y )

' Fill the first series with Bubble Size values stored in the str_z variable
chart.SetSeriesZValuesFromString( 0, str_z )
C#
// Let's build the series values strings with ";" as separator
string str_x= "4.5;1.2;2.5;2.9;1.8";
string str_y= "12;7.5;11.3;9.2;5.3";
string str_z= "456;478;314;125;265";

// Set the series caption
chart.SetSeriesCaption( 0, "Production" );

// Fill the series with XY values stored in the str variables
chart.SetSeriesXValuesFromString( 0, str_x );
chart.SetSeriesYValuesFromString( 0, str_y );

// Fill the first series with Bubble Size values stored in the str_z variable
chart.SetSeriesZValuesFromString( 0, str_z );

See Also

SetSeriesXValuesFromString Method | SetSeriesYValuesFromString Method | SetSeriesXValuesFromArray Method | SetSeriesYValuesFromArray Method | GetSeriesXValue Method | GetSeriesYValue Method | SetSeriesCaption Method

Applies To: Chart Object