Skip to main content
A newer version of this page is available. .

RangeSegmentColorizer.RangeStops Property

Returns the collection of double values that form ranges to determine the color a line/area segment should have.

Namespace: DevExpress.Xpf.Charts

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

Declaration

public DoubleCollection RangeStops { get; set; }

Property Value

Type Description
DoubleCollection

The collection that contains range stops.

Example

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

<dxc:ChartControl>
    <!-- The title settings are skipped. -->
    <dxc:ChartControl.Legends>
        <dxc:Legend HorizontalPosition="RightOutside" 
                    VerticalPosition="Top" 
                    ReverseItems="True"/>
    </dxc:ChartControl.Legends>
    <dxc:XYDiagram2D>
        <!-- The axis settings are skipped. -->
        <dxc:LineSeries2D  DisplayName="Temperature" 
                           DataSource="{Binding}" 
                           ArgumentDataMember="Date" 
                           ValueDataMember="Temperature">
            <dxc:LineSeries2D.SegmentColorizer>
                <dxc:RangeSegmentColorizer RangeStops="-40 -30 -20 -15 -10 -5 0 5 10 15 20 30" 
                                           LegendTextPattern="{}{V1:F0}°C — {V2:F0}°C"
                                           ShowInLegend="True">
                    <dxc:RangeSegmentColorizer.Palette>
                        <dxc:CustomPalette>
                            <dxc:CustomPalette.Colors>
                                <Color>DarkBlue</Color>
                                <Color>SteelBlue</Color>
                                <Color>LightBlue</Color>
                                <Color>Yellow</Color>
                                <Color>OrangeRed</Color>
                            </dxc:CustomPalette.Colors>
                        </dxc:CustomPalette>    
                    </dxc:RangeSegmentColorizer.Palette>         
                </dxc:RangeSegmentColorizer>
            </dxc:LineSeries2D.SegmentColorizer>
        </dxc:LineSeries2D>
    </dxc:XYDiagram2D>
</dxc:ChartControl>

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