Back to Devexpress

TrendSegmentColorizer Class

wpf-devexpress-dot-xpf-dot-charts-19d84785.md

latest4.7 KB
Original Source

TrendSegmentColorizer Class

The colorizer that changes a line/area’s color when a point value increases or decreases.

Namespace : DevExpress.Xpf.Charts

Assembly : DevExpress.Xpf.Charts.v25.2.dll

NuGet Package : DevExpress.Wpf.Charts

Declaration

csharp
public class TrendSegmentColorizer :
    SegmentColorizerBase,
    ITrendSegmentColorizer,
    ILegendItemsProvider
vb
Public Class TrendSegmentColorizer
    Inherits SegmentColorizerBase
    Implements ITrendSegmentColorizer,
               ILegendItemsProvider

Remarks

You can apply the Trend Segment colorizer to the line/area series and their descendants. To do this, assign the TrendSegmentColorizer object to the series’s SegmentColorizer property.

Use the following properties to configure the TrendSegmentColorizer :

Example

This example demonstrates how to use the TrendSegmentColorizer to color a line series by its segments.

xaml
<dxc:ChartControl>
    <!--...-->
    <dxc:XYDiagram2D>
        <!--...-->
        <dxc:LineSeries2D DisplayName="Temperature" 
                           DataSource="{Binding}" 
                           ArgumentDataMember="Date" 
                           ValueDataMember="Temperature">
            <dxc:LineSeries2D.SegmentColorizer>
                <dxc:TrendSegmentColorizer RisingTrendColor="Firebrick" 
                                           FallingTrendColor="RoyalBlue"
                                           RisingTrendLegendText = "Temperature Rise"
                                           FallingTrendLegendText = "Temperature Decrease"
                                           ShowInLegend="True"/>
            </dxc:LineSeries2D.SegmentColorizer>
        </dxc:LineSeries2D>
    </dxc:XYDiagram2D>
</dxc:ChartControl>

Inheritance

Object DispatcherObject DependencyObject Freezable ChartDependencyObject SegmentColorizerBase TrendSegmentColorizer

See Also

TrendSegmentColorizer Members

Segment Colorizers

DevExpress.Xpf.Charts Namespace