mobilecontrols-devexpress-dot-xamarinforms-dot-charts-6fdedf5c.md
Retrieves point colors and their legend item descriptions from data source fields.
Namespace : DevExpress.XamarinForms.Charts
Assembly : DevExpress.XamarinForms.Charts.dll
NuGet Package : DevExpress.XamarinForms.Charts
public class ColorDataAdapter :
DataSourceAdapterBase,
ICustomPointColorizer,
IPointColorizer,
ILegendItemProvider
You can specify a series point colorizer based on colors stored in a data source. To do this:
In this example, the bar chart visualizes GDP values for the G20 and paints bars with colors from the specified field of the data source. Legend items obtain descriptions for these colors from another field.
Create a data source – a list of objects each of which stores a country’s name, GDP value, region (the part of the world where the country is located), and color for this region.
Set the BarSeries.PointColorizer property to a ColorDataAdapter object with the following properties specified:
Object DataSourceAdapterBase ColorDataAdapter
See Also