Skip to main content
A newer version of this page is available. .

BubbleSeries2D.MaxSize Property

Gets or sets the maximum size of the bubble marker.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v19.1.dll

Declaration

public double MaxSize { get; set; }

Property Value

Type Description
Double

A Double value which specifies the marker’s maximum size (measured in X-axis units). The BubbleSeries2D.MinSize and MaxSize properties specify the marker’s size range on the X-axis.

This value should be greater than 0.

Remarks

Bubble sizes are calculated automatically by default. Set the BubbleSeries2D.AutoSize property to false to manually specify maximum and minimum bubble sizes using the BubbleSeries2D.MaxSize and BubbleSeries2D.MinSize properties.

The BubbleSeries2D.MaxSize property is intended to forcibly limit the maximum size of the marker when the weight of a series point is too high relative to the other series points, and this may affect the appearance of a chart.

When calculating a bubble’s size, the extreme values within a single series are taken into account. This means that the maximum value in a series determines the MaxSize of a bubble and the minimum value - its BubbleSeries2D.MinSize. These values are calculated in the measurement units of the X-axis.

Note that the MaxSize property’s value should be greater than the value of the BubbleSeries2D.MinSize property.

Example

The following example demonstrates how to create a 2D Bubble chart. To do this, it is necessary to assign the ChartControl.Diagram property to XYDiagram2D, and then add a BubbleSeries2D object with points to the diagram’s Diagram.Series collection.

Also, this example shows how to customize the Y-axis whole range and a crosshair cursor.

<Window x:Class="Bubble2DChart.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts" Title="Window1" Height="350" Width="620">
    <Grid>
        <dxc:ChartControl>
            <dxc:ChartControl.CrosshairOptions>
                <dxc:CrosshairOptions ShowValueLine="True" ShowValueLabels="True"/>
            </dxc:ChartControl.CrosshairOptions>
            <dxc:ChartControl.Diagram>
                <dxc:XYDiagram2D>
                    <dxc:XYDiagram2D.Series>
                        <dxc:BubbleSeries2D Transparency="0.2" AutoSize="False"  MinSize="1" MaxSize="3" ColorEach="True" 
                                            CrosshairLabelPattern="Argument: {A}; Value: {V}; Weight: {W}">
                            <dxc:BubbleSeries2D.Points>
                                <dxc:SeriesPoint Argument="A" Value="100" dxc:BubbleSeries2D.Weight="0.9" />
                                <dxc:SeriesPoint Argument="B" Value="60" dxc:BubbleSeries2D.Weight="0.8" />
                                <dxc:SeriesPoint Argument="C" Value="30" dxc:BubbleSeries2D.Weight="0.5" />
                                <dxc:SeriesPoint Argument="D" Value="43" dxc:BubbleSeries2D.Weight="0.4" />
                                <dxc:SeriesPoint Argument="E" Value="11" dxc:BubbleSeries2D.Weight="0.4"/>
                                <dxc:SeriesPoint Argument="F" Value="29" dxc:BubbleSeries2D.Weight="0.2"/>
                                <dxc:SeriesPoint Argument="G" Value="12" dxc:BubbleSeries2D.Weight="0.2"/>
                                <dxc:SeriesPoint Argument="H" Value="21" dxc:BubbleSeries2D.Weight="0.2"/>
                                <dxc:SeriesPoint Argument="I" Value="28" dxc:BubbleSeries2D.Weight="0.2"/>
                            </dxc:BubbleSeries2D.Points>
                        </dxc:BubbleSeries2D>
                    </dxc:XYDiagram2D.Series>
                    <dxc:XYDiagram2D.AxisY>
                        <dxc:AxisY2D GridLinesMinorVisible="True" >
                            <dxc:AxisY2D.WholeRange>
                                <dxc:Range MinValue="0" MaxValue="130" 
                                           SideMarginsValue="0" />
                            </dxc:AxisY2D.WholeRange>
                        </dxc:AxisY2D>
                    </dxc:XYDiagram2D.AxisY>
                </dxc:XYDiagram2D>
            </dxc:ChartControl.Diagram>
        </dxc:ChartControl>
    </Grid>
</Window>

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the MaxSize 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