Skip to main content

Series.Colorizer Property

Gets or sets the colorizer used by this series.

Namespace: DevExpress.Xpf.Charts

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

NuGet Package: DevExpress.Wpf.Charts

Declaration

public ChartColorizerBase Colorizer { get; set; }

Property Value

Type Description
ChartColorizerBase

A ChartColorizerBase class descendant object.

Example

To use the Range Colorizer, perform the following steps.

<Window
        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"
        x:Class="RangeColorizerExample.MainWindow"
        Title="MainWindow" Height="720" Width="1280">

    <Window.Resources>
        <XmlDataProvider x:Key="dataProvider" Source="Data/HPI.xml"/>
    </Window.Resources>

    <Grid DataContext="{Binding Source={StaticResource dataProvider}}">
        <dxc:ChartControl>
            <dxc:ChartControl.Titles>
                <dxc:Title Content="GDP for G20" HorizontalAlignment="Center"/>
            </dxc:ChartControl.Titles>
            <dxc:ChartControl.Legend>
                <dxc:Legend HorizontalPosition="Center" Orientation="Horizontal"/>
            </dxc:ChartControl.Legend>
            <dxc:XYDiagram2D>
                <dxc:BarSideBySideSeries2D DisplayName="GDP" 
                                           DataSource="{Binding XPath=/G20HPIs/CountryStatistics}"
                                           ArgumentDataMember="Country" 
                                           ValueDataMember="Product"
                                           ColorDataMember="HPI">
                    <dxc:BarSideBySideSeries2D.Colorizer>
                        <dxc:RangeColorizer RangeStops="22 30 38 46 54 64" LegendTextPattern="{}{V1} - {V2} HPI">
                            <dxc:RangeColorizer.Palette>
                                <dxc:CustomPalette>
                                    <dxc:CustomPalette.Colors>
                                        <Color A="255" R="255" G="90" B="25"/>
                                        <Color A="255" R="229" G="227" B="53"/>
                                        <Color A="255" R="110" G="201" B="92"/>
                                    </dxc:CustomPalette.Colors>
                                </dxc:CustomPalette>
                            </dxc:RangeColorizer.Palette>
                        </dxc:RangeColorizer>
                    </dxc:BarSideBySideSeries2D.Colorizer>
                </dxc:BarSideBySideSeries2D>
            </dxc:XYDiagram2D>
        </dxc:ChartControl>
    </Grid>
</Window>

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