Back to Devexpress

TrendSegmentColorizer Class

corelibraries-devexpress-dot-xtracharts-8876c1fa.md

latest4.9 KB
Original Source

TrendSegmentColorizer Class

The colorizer that changes a line‘s color when a point value increases or decreases.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

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

Remarks

You can use the TrendSegmentColorizer to color the line series view and its descendants. To do this, assign the TrendSegmentColorizer object to the LineSeriesView.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.

csharp
TrendSegmentColorizer colorizer = new TrendSegmentColorizer();
colorizer.FallingTrendColor = Color.RoyalBlue;
colorizer.RisingTrendColor = Color.Firebrick;
colorizer.FallingTrendLegendText = "Temperature Decrease";
colorizer.RisingTrendLegendText = "Temperature Rise";
colorizer.ShowInLegend = true;
LineSeriesView lineSeriesView = chartControl.Series[0].View as LineSeriesView;
lineSeriesView.SegmentColorizer = colorizer;
vb
Dim colorizer As TrendSegmentColorizer = New TrendSegmentColorizer
colorizer.FallingTrendColor = Color.RoyalBlue
colorizer.RisingTrendColor = Color.Firebrick
colorizer.FallingTrendLegendText = "Temperature Decrease"
colorizer.RisingTrendLegendText = "Temperature Rise"
colorizer.ShowInLegend = true
Dim lineSeriesView As LineSeriesView = CType(chartControl.Series(0).View,LineSeriesView)
lineSeriesView.SegmentColorizer = colorizer

Implements

ILegendItemProvider

Inheritance

Object ChartElement SegmentColorizerBase TrendSegmentColorizer

See Also

TrendSegmentColorizer Members

DevExpress.XtraCharts Namespace