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

ChartStyleBase.Palette Property

Gets or sets a palette (collection of colors) used to draw a chart series.

Namespace: DevExpress.XamarinForms.Charts

Assembly: DevExpress.XamarinForms.Charts.dll

Declaration

public Color[] Palette { get; set; }

Property Value

Type Description
Color[]

A palette used to draw a chart series.

Example

This example shows how to adjust a bar chart view so that it draws bars in different colors taken from the specified palette.

<ContentPage>
    <ContentPage.BindingContext>
        <local:ViewModel/>
    </ContentPage.BindingContext>
    <dxc:ChartView>
        <dxc:ChartView.ChartStyle>
            <dxc:ChartStyle Palette="{Binding Palette}"/>
        </dxc:ChartView.ChartStyle>
        <dxc:ChartView.Series>
            <dxc:BarSeries ColorEach="True">
                <!--...-->
            </dxc:BarSeries>
        </dxc:ChartView.Series>
    </dxc:ChartView>
</ContentPage>

Bar Colors

See Also