Class BubbleSeries
The BubbleSeries displays a collection of data points represented by a bubble of different size.
Inherited Members
Namespace: Syncfusion.Maui.Toolkit.Charts
Assembly: Syncfusion.Maui.Toolkit.dll
Syntax
public class BubbleSeries : XYDataSeries, IDatapointSelectionDependent, ITooltipDependent, IDataTemplateDependent, IDrawCustomLegendIcon
Remarks
To render a series, create an instance of BubbleSeries class, and add it to the Series collection.
It provides options for Fill, PaletteBrushes, StrokeWidth, Stroke, and Opacity to customize the appearance.
MaximumRadius - Specifies the maximum radius to the bubble series MaximumRadius property.
MinimumRadius - Specifies the minimum radius to the bubble series MinimumRadius property.
SizeValuePath - Specify the bubble size using the SizeValuePath property.
ShowZeroSizeBubbles - Specifies the option to show zero size bubble, when its true the zero size bubble render with minimum radius ShowZeroSizeBubbles property.
EnableTooltip - A tooltip displays information while tapping or mouse hovering above a segment. To display the tooltip on a chart, you need to set the EnableTooltip property as true in BubbleSeries class, and also refer TooltipBehavior property.
Data Label - Data labels are used to display values related to a chart segment. To render the data labels, you need to set the ShowDataLabels property as true in BubbleSeries class. To customize the chart data labels alignment, placement, and label styles, you need to create an instance of CartesianDataLabelSettings and set to the DataLabelSettings property.
Animation - To animate the series, set True to the EnableAnimation property.
LegendIcon - To customize the legend icon using the LegendIcon property.
Examples
<chart:SfCartesianChart>
<chart:SfCartesianChart.XAxes>
<chart:NumericalAxis/>
</chart:SfCartesianChart.XAxes>
<chart:SfCartesianChart.YAxes>
<chart:NumericalAxis/>
</chart:SfCartesianChart.YAxes>
<chart:SfCartesianChart.Series>
<chart:BubbleSeries
ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
SizeValuePath="Size"/>
</chart:SfCartesianChart.Series>
</chart:SfCartesianChart>
Constructors
BubbleSeries()
Initializes a new instance of the BubbleSeries class.
Declaration
public BubbleSeries()
Fields
MaximumRadiusProperty
Identifies the MaximumRadius bindable property.
Declaration
public static readonly BindableProperty MaximumRadiusProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
Defines the maximum radius for the bubbles in the series.
MinimumRadiusProperty
Identifies the MinimumRadius bindable property.
Declaration
public static readonly BindableProperty MinimumRadiusProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
Defines the minimum radius for the bubbles in the series.
ShowZeroSizeBubblesProperty
Identifies the ShowZeroSizeBubbles bindable property.
Declaration
public static readonly BindableProperty ShowZeroSizeBubblesProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
Determines whether to display bubbles with a size of zero.
SizeValuePathProperty
Identifies the SizeValuePath bindable property.
Declaration
public static readonly BindableProperty SizeValuePathProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
Specifies the path to the property that determines the size of the bubbles.
StrokeProperty
Identifies the Stroke bindable property.
Declaration
public static readonly BindableProperty StrokeProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
Defines the stroke brush used for the outline of the bubbles.
Properties
MaximumRadius
Gets or sets maximum radius to the bubble series.
Declaration
public double MaximumRadius { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts System.Double and its default is 10. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:BubbleSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
SizeValuePath="Size"
MaximumRadius="15" />
</chart:SfCartesianChart>
MinimumRadius
Gets or sets minimum radius to the bubble series.
Declaration
public double MinimumRadius { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts System.Double and its default is 3. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:BubbleSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
SizeValuePath="Size"
MinimumRadius="5" />
</chart:SfCartesianChart>
ShowZeroSizeBubbles
Gets or sets the option to show zero size bubble. When it's true, the zero-size bubble renders with a minimum radius.
Declaration
public bool ShowZeroSizeBubbles { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | It accepts System.Boolean and its default is true. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:BubbleSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
SizeValuePath="Size"
ShowZeroSizeBubbles="False"/>
</chart:SfCartesianChart>
SizeValuePath
Gets or sets a path value on the source object to serve a size to the bubble series.
Declaration
public string SizeValuePath { get; set; }
Property Value
Type | Description |
---|---|
System.String | It accepts System.String and its default is |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:BubbleSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
SizeValuePath="Size"/>
</chart:SfCartesianChart>
Stroke
Gets or sets a value to customize the border appearance of the bubble.
Declaration
public Brush Stroke { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.Brush | It accepts Microsoft.Maui.Controls.Brush, and its default is Transparent. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:BubbleSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
SizeValuePath="Size"
Stroke ="Red" />
</chart:SfCartesianChart>
Methods
CreateSegment()
Creates and initializes a new chart segment for the chart.
Declaration
protected override ChartSegment CreateSegment()
Returns
Type |
---|
ChartSegment |