Back to Devexpress

ValueBandPointColorizer Class

mobilecontrols-devexpress-dot-xamarinforms-dot-charts-4e282916.md

latest3.9 KB
Original Source

ValueBandPointColorizer Class

A value range colorizer that colors series points based on their Y-axis values.

Namespace : DevExpress.XamarinForms.Charts

Assembly : DevExpress.XamarinForms.Charts.dll

NuGet Package : DevExpress.XamarinForms.Charts

Declaration

csharp
public class ValueBandPointColorizer :
    BandPointColorizerBase,
    IPointColorizer,
    IStackedPointColorizer,
    IWeightedPointColorizer

Remarks

Use this colorizer type to color points of a Point, Bar, Line, Area, RangeArea, StackedArea, StackedBar or Bubble series based on Y-axis values:

  1. Assign a ValueBandPointColorizer object to the series’s PointColorizer property (Line1PointColorizer/Line2PointColorizer for a range area series).
  2. Populate the colorizer’s ColorStops collection with ColorStop objects. Each ColorStop object defines a value range (a pair of Y-axis values) and color. If a Y-axis value falls within the range, the point is painted with this color.

Example

In this example, the bar chart displays cryptocurrency portfolio yield. It colors series points red when their Y-axis values are between -100 and 0 , and green when values are between 0 and 100. Note that this chart diagram is rotated.

  1. Create a data source – a list of objects each of which has the Ticker property that returns a string (point argument) and the Profit property that returns a number (point value).

  2. Assign a ValueBandPointColorizer object to the BarSeries.PointColorizer property. Populate the colorizer’s ColorStops collection with two ColorStop objects that specify colors for ranges of point values.

Implements

INotifyPropertyChanged

IPointColorizer

IStackedPointColorizer

IWeightedPointColorizer

Inheritance

Object ChartElement BandPointColorizerBase ValueBandPointColorizer

See Also

ValueBandPointColorizer Members

DevExpress.XamarinForms.Charts Namespace