Skip to main content

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.v24.1.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

ChartData BubbleSize { get; set; }

Property Value

Type Description
ChartData

A ChartData object specifying data to plot.

Remarks

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.

View Example

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

The following code snippets (auto-collected from DevExpress Examples) contain references to the BubbleSize property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also