Back to Devexpress

ICustomColorizerNumericValueProvider.GetValueForColorizer(Int32) Method

maui-devexpress-dot-maui-dot-charts-dot-icustomcolorizernumericvalueprovider-dot-getvalueforcolorizer-x28-system-dot-int32-x29.md

latest1.7 KB
Original Source

ICustomColorizerNumericValueProvider.GetValueForColorizer(Int32) Method

Returns a numeric value according to the data source point index. The colorizer uses this value to determine the point color.

Namespace : DevExpress.Maui.Charts

Assembly : DevExpress.Maui.Charts.dll

NuGet Package : DevExpress.Maui.Charts

Declaration

csharp
double GetValueForColorizer(
    int index
)

Parameters

NameTypeDescription
indexInt32

The data source point index.

|

Returns

TypeDescription
Double

A numeric value to determine the point color.

|

Remarks

The following example implements a custom colorizer:

View Example

xaml
public class HpiIndexCustomColorizerAdapter : ICustomColorizerNumericValueProvider {
    readonly CountriesStatisticData data = new CountriesStatisticData();

    public List<CountryStatistic> SeriesData => this.data.SeriesData;

    public double GetValueForColorizer(int index) {
        return this.data.SeriesData[index].Hpi;
    }
}

See Also

ICustomColorizerNumericValueProvider Interface

ICustomColorizerNumericValueProvider Members

DevExpress.Maui.Charts Namespace