.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

Series.BubbleSize Property

Gets or sets data used to specify the size of bubbles in a bubble chart.

Namespace: DevExpress.Spreadsheet.Charts

Assembly: DevExpress.Spreadsheet.v20.2.Core.dll


ChartData BubbleSize { get; set; }
Property BubbleSize As ChartData

Property Value

Type Description

A ChartData object specifying data to plot.


This example creates a bubble chart by adding series to an empty chart of the ChartType.Bubble type. The Series.BubbleSize property specifies data visualized as the diameter of the bubble associated with a data point. To display the value of the bubble size in the data label, the DataLabelBase.ShowBubbleSize property is set to true.

Dim worksheet As Worksheet = workbook.Worksheets("chartBubble")
workbook.Worksheets.ActiveWorksheet = worksheet

' Create a chart and specify its location
Dim chart As Chart = worksheet.Charts.Add(ChartType.Bubble3D)
chart.TopLeftCell = worksheet.Cells("F2")
chart.BottomRightCell = worksheet.Cells("L15")

Dim s1 As Series = chart.Series.Add(worksheet("A3"), worksheet("C3:C7"), worksheet("D3:D7"))
s1.BubbleSize = ChartData.FromRange(worksheet("E3:E7"))
Dim s2 As Series = chart.Series.Add(worksheet("A9"), worksheet("C9:C13"), worksheet("D9:D13"))
s2.BubbleSize = ChartData.FromRange(worksheet("E9:E13"))

' Set the chart style
chart.Style = ChartStyle.ColorGradient
' Set the bubble size 1.5x relative to the default setting.
chart.Views(0).BubbleScale = 150

' Hide the legend
chart.Legend.Visible = False

' Display data labels
Dim dataLabels As DataLabelOptions = chart.Views(0).DataLabels
dataLabels.ShowBubbleSize = True

' Set the minimum and maximum values for the chart value axis.
Dim axis As Axis = chart.PrimaryAxes(1)
axis.Scaling.AutoMax = False
axis.Scaling.Max = 82
axis.Scaling.AutoMin = False
axis.Scaling.Min = 64
See Also