Back to Devexpress

TrendSegmentColorizer.ShowInLegend Property

corelibraries-devexpress-dot-xtracharts-dot-trendsegmentcolorizer-b34ab9a2.md

latest3.5 KB
Original Source

TrendSegmentColorizer.ShowInLegend Property

Gets or sets the value that specifies whether the colorizer should provide items for the legend.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
[XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)]
public bool ShowInLegend { get; set; }
vb
<XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)>
Public Property ShowInLegend As Boolean

Property Value

TypeDescription
Boolean

true , if the legend should show the colorizer items; otherwise, false.

|

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

ShowInLegend

See Also

TrendSegmentColorizer Class

TrendSegmentColorizer Members

DevExpress.XtraCharts Namespace