Skip to main content

BubbleSeries.ColorEach Property

OBSOLETE

Use the PointColorizer property instead.

This property is obsolete (use the PointColorizer property instead). Indicates whether series bubbles are drawn in different colors.

Namespace: DevExpress.XamarinForms.Charts

Assembly: DevExpress.XamarinForms.Charts.dll

NuGet Package: DevExpress.XamarinForms.Charts

Declaration

[Obsolete("Use the PointColorizer property instead.")]
public bool ColorEach { get; set; }

Property Value

Type Description
Boolean

true to draw each bubble in a different color; false to use the same color for all bubbles.

Remarks

To specify bubble colors to be used when the ColorEach property is set to true, assign a ChartStyle object with the specified Palette to the chart view’s ChartStyle property.

To draw all bubbles of a series in the same color, set the BubbleSeries.Style property to the BubbleSeriesStyle object and set the BubbleSeriesStyle.MarkerStyle property to the MarkerStyle object with the specified Fill color.

Example

This example shows how to adjust a bubble chart view so that it draws bubbles in different colors taken from the specified palette, and how to configure the size of bubbles.

<ContentPage>
    <ContentPage.BindingContext>
        <local:MainViewModel/>
    </ContentPage.BindingContext>
    <dxc:ChartView>
        <dxc:ChartView.ChartStyle>
            <dxc:ChartStyle Palette="{Binding Palette}"/>
        </dxc:ChartView.ChartStyle>
        <dxc:ChartView.Series>
            <dxc:BubbleSeries ColorEach="True" MinSize="1" MaxSize="2">
                <!--...-->
            </dxc:BubbleSeries>
        </dxc:ChartView.Series>
    </dxc:ChartView>
</ContentPage>
using Xamarin.Forms;
// ...
class MainViewModel {
    // ...
    public Color[] Palette { get; }

    public ViewModel() {
        // ...
        Palette = new Color[] {
            Color.FromHex("#7faedb"),
            Color.FromHex("#abaca8"),
            Color.FromHex("#809ad0"),
            Color.FromHex("#c8e0f2"),
            Color.FromHex("#dddfdc"),
            Color.FromHex("#f29f64"),
            Color.FromHex("#ebcb5a"),
            Color.FromHex("#98bf81"),
            Color.FromHex("#fbdabf"),
            Color.FromHex("#ffeaab")
        };
    }
}

Bubble Series Style

See Also