PointBasedSegmentColorizer.Direction Property

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

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v20.1.dll


public ColorDistributionDirection Direction { get; set; }
Public Property Direction As ColorDistributionDirection

Property Value

Type Description

The value that specifies the color distribution direction.


The following images show the Direction property in action:

Direction Image
ColorDistributionDirection.Forward Forward
ColorDistributionDirection.Backward Backward


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