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

PointBasedSegmentColorizer.Direction Property

Gets or sets the direction that is used to distribute the point marker color.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v19.1.dll

Declaration

[XtraChartsLocalizableCategory(XtraChartsCategory.Appearance)]
[XtraSerializableProperty]
public ColorDistributionDirection Direction { get; set; }

Property Value

Type Description
ColorDistributionDirection

The value that specifies the color distribution direction.

Available values:

Name Description
Forward

The point marker provides a color for the line/area segment that follows the marker.

Backward

The point marker provides a color for the line/area segment that precedes the marker.

Remarks

The following images show the Direction property in action:

Direction Image
ColorDistributionDirection.Forward Forward
ColorDistributionDirection.Backward Backward

Example

This example demonstrates how to use the PointBasedSegmentColorizer to paint a line series by its segments.

Point Based Segment Colorizer

LineSeriesView lineSeriesView = chartControl.Series[0].View as LineSeriesView;
lineSeriesView.MarkerVisibility = DevExpress.Utils.DefaultBoolean.True;

// Specify the colorizer that paints the series markers.
RangeColorizer rangeColorizer = new RangeColorizer();
rangeColorizer.Palette = new Palette("TemperaturePalette", new PaletteEntry[] { new PaletteEntry(Color.DarkBlue),
                                                                                new PaletteEntry(Color.SteelBlue),
                                                                                new PaletteEntry(Color.LightBlue),
                                                                                new PaletteEntry(Color.Yellow),
                                                                                new PaletteEntry(Color.OrangeRed) });

rangeColorizer.LegendItemPattern = "{V1: F0}°C — {V2: F0}°C";
rangeColorizer.RangeStops.AddRange(new double[] { -40, -35, -30, -25, -20, -15, -10, -5, 0, 5, 10, 15, 20, 25, 30 });
chartControl.Series[0].Colorizer = rangeColorizer;

// Specify the colorizer that paints the line segments.
PointBasedSegmentColorizer segmentColorizer = new PointBasedSegmentColorizer();
segmentColorizer.Direction = ColorDistributionDirection.Forward;
lineSeriesView.SegmentColorizer = segmentColorizer;
See Also