Back to Devexpress

ChartStyleBase.Palette Property

maui-devexpress-dot-maui-dot-charts-dot-chartstylebase.md

latest2.0 KB
Original Source

ChartStyleBase.Palette Property

Gets or sets a palette (collection of colors) used to draw chart series and series points. This is a bindable property.

Namespace : DevExpress.Maui.Charts

Assembly : DevExpress.Maui.Charts.dll

NuGet Package : DevExpress.Maui.Charts

Declaration

csharp
public Color[] Palette { get; set; }

Property Value

TypeDescription
Color[]

An array of Color objects that specifies the chart’s palette.

|

Remarks

The following example uses the palette colors to paint line series:

xaml
<dxc:ChartView>
    <dxc:ChartView.ChartStyle>
        <dxc:ChartStyle>
            <dxc:ChartStyle.Palette>
                <x:Array Type="{x:Type Color}">
                    <Color>#C82C4A</Color>
                    <Color>#168051</Color>
                    <Color>#2D67D0</Color>
                </x:Array>
            </dxc:ChartStyle.Palette>
        </dxc:ChartStyle>
    </dxc:ChartView.ChartStyle>
    <dxc:ChartView.Series>
        <dxc:LineSeries .../>
        <dxc:LineSeries .../>
        <dxc:LineSeries .../>
    </dxc:ChartView.Series>
</dxc:ChartView>

The ColorEachPointColorizer uses ChartStyleBase.Palette colors if its Palette is not specified.

See Also

ChartStyleBase Class

ChartStyleBase Members

DevExpress.Maui.Charts Namespace