Back to Devexpress

CustomValueBandPointColorizer Class

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

latest3.3 KB
Original Source

CustomValueBandPointColorizer Class

A value range colorizer that colors series points according to a custom algorithm based on values of the specified data source field.

Namespace : DevExpress.XamarinForms.Charts

Assembly : DevExpress.XamarinForms.Charts.dll

NuGet Package : DevExpress.XamarinForms.Charts

Declaration

csharp
public class CustomValueBandPointColorizer :
    BandPointColorizerBase,
    IPointColorizer,
    IStackedPointColorizer,
    IWeightedPointColorizer,
    IRangePointColorizer

Example

In this example, the bubble chart displays GDP values for the G20. A point’s size indicates the country population and the color indicates the HPI.

  1. Create a data source – a list of objects each of which stores a country’s name, GDP value, population, and HPI.

  2. Create a class (HpiProvider, in this example) that implements the ICustomColorizerNumericValueProvider interface and the GetValueForColorizer method, which returns the Hpi value for a series point.

  3. Set the BubbleSeries.PointColorizer property to a CustomValueBandPointColorizer object and assign an HpiProvider object to the CustomValueBandPointColorizer.ValueProvider property.

  4. Populate the colorizer’s ColorStops collection to specify colors for ranges of HPI values.

Implements

INotifyPropertyChanged

IPointColorizer

IStackedPointColorizer

IWeightedPointColorizer

IRangePointColorizer

Inheritance

Object ChartElement BandPointColorizerBase CustomValueBandPointColorizer

See Also

CustomValueBandPointColorizer Members

How to: Colorize Series Points

How to: Colorize Line and Area Segments

DevExpress.XamarinForms.Charts Namespace