Back to Devexpress

TrendSegmentColorizer.ShowInLegend Property

wpf-devexpress-dot-xpf-dot-charts-dot-trendsegmentcolorizer-ed173202.md

latest3.1 KB
Original Source

TrendSegmentColorizer.ShowInLegend Property

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

Namespace : DevExpress.Xpf.Charts

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

NuGet Package : DevExpress.Wpf.Charts

Declaration

csharp
public bool ShowInLegend { get; set; }
vb
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.

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>

See Also

TrendSegmentColorizer Class

TrendSegmentColorizer Members

DevExpress.Xpf.Charts Namespace