Back to Devexpress

AreaSeries.FillColorizer Property

maui-devexpress-dot-maui-dot-charts-dot-areaseries.md

latest3.5 KB
Original Source

AreaSeries.FillColorizer Property

Gets or sets a colorizer that specifies how to paint area segments.

Namespace : DevExpress.Maui.Charts

Assembly : DevExpress.Maui.Charts.dll

NuGet Package : DevExpress.Maui.Charts

Declaration

csharp
public IFillColorizer FillColorizer { get; set; }

Property Value

TypeDescription
IFillColorizer

A SegmentBasedFillColorizer object.

|

Remarks

The ChartView supports the point-based segment colorizer that paints line/area segments with colors of point markers, and uses color gradients for segments between different color points.

To colorize area segments of a series, follow the steps below:

  1. Assign a SegmentBasedFillColorizer object to the FillColorizer property of the series.
  2. Assign a GradientPointBasedSegmentColorizer object to the fill colorizer’s SegmentColorizer property.
  3. Assign one of the following objects to the segment colorizer’s PointColorizer property:

Example

In this example, the area chart visualizes the visible light spectrum.

  1. Create a data source - a list of objects that define data points with numeric arguments (wavelength) and values (intensity).

  2. Create a colorizer class (LightSpectorColorizer, in this example) that implements the ICustomPointColorizer interface.
    Implement the GetColor method to return a data point’s color based on a ColoredPointInfo object passed to the method as a parameter. Use the ColoredPointInfo.NumericArgument property to obtain the data point’s argument value.
    This class should also implement the ICustomPointColorizer.GetLegendItemProvider method and the ILegendItemProvider interface to specify legend items that show wavelength colors.

  3. Assign a SegmentBasedFillColorizer object to the AreaSeries.FillColorizer property.

  4. Set the SegmentBasedFillColorizer.SegmentColorizer property to a GradientPointBasedSegmentColorizer object, and assign a LightSpectorColorizer object to the GradientPointBasedSegmentColorizer.PointColorizer property.

See Also

AreaSeries Class

AreaSeries Members

DevExpress.Maui.Charts Namespace