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

object.SetSeriesZValuesFromString index, values

Arguments

object
Required. A Chart object.
index
Required. An integer value that specifies the zero-based index of the series in the chart object.
values
Required. 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.

VBScript Sample Code

The following VBScript 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
  

' Let's build the series values strings with ";" as separator
str_x= "4.5;1.2;2.5;2.9;1.8"
str_y= "12;7.5;11.3;9.2;5.3"
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