Back to Devexpress

ICustomPointColorizer Interface

mobilecontrols-devexpress-dot-xamarinforms-dot-charts-beb57394.md

latest2.4 KB
Original Source

ICustomPointColorizer Interface

An interface that should be implemented by a class that defines a custom point colorizer for a point, bar, line, area or range area series.

Namespace : DevExpress.XamarinForms.Charts

Assembly : DevExpress.XamarinForms.Charts.dll

NuGet Package : DevExpress.XamarinForms.Charts

Declaration

csharp
public interface ICustomPointColorizer :
    IPointColorizer

Example

In this example, the bar chart displays monthly values colored based on the season.

  1. Create a data source – a list of objects that define data points with date-time arguments and numeric values.

  2. Create a colorizer class (CustomColorizer 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 as the method’s parameter. Use the ColoredPointInfo.DateTimeArgument property to obtain the data point’s argument value.

  3. Assign a CustomColorizer object to the BarSeries.PointColorizer property.

See Also

ICustomPointColorizer Members

How to: Colorize Series Points

How to: Colorize Line and Area Segments

DevExpress.XamarinForms.Charts Namespace