maui-devexpress-dot-maui-dot-charts-e487b0ac.md
An interface that should be implemented by a custom point colorizer that has access to indexes of the data source items corresponding to series points.
Namespace : DevExpress.Maui.Charts
Assembly : DevExpress.Maui.Charts.dll
NuGet Package : DevExpress.Maui.Charts
public interface IIndexBasedCustomPointColorizer :
IPointColorizer,
IStackedPointColorizer,
IWeightedPointColorizer,
IRangePointColorizer
In this example, the bar chart visualizes GDP values for the G20 and colors data points according to which part of the world the country belongs.
Create a data source – a list of objects each of which stores a country’s name, GDP value, and the part of the world (region) where the country is located.
Create a class (ColorizerByRegion, in this example) that implements the IIndexBasedCustomPointColorizer interface. Specify a color for each region and implement the IIndexBasedCustomPointColorizer.GetColor method that returns a color for each data point depending on the Region data member’s value.
This class should also implement the IIndexBasedCustomPointColorizer.GetLegendItemProvider method and the ILegendItemProvider interface to specify legend items that show region colors.
Assign a ColorizerByRegion object to the BarSeries.PointColorizer property.
Yield<IIndexBasedCustomPointColorizer>()
YieldIfNotNull<IIndexBasedCustomPointColorizer>()
See Also