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).
Public Sub SetSeriesZValuesFromString( index As Integer, values As String )
public void SetSeriesZValuesFromString( int index, string values );
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.
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.
|
' 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 )
// 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 );
SetSeriesXValuesFromString Method | SetSeriesYValuesFromString Method | SetSeriesXValuesFromArray Method | SetSeriesYValuesFromArray Method | GetSeriesXValue Method | GetSeriesYValue Method | SetSeriesCaption Method
Applies To: Chart Object