IColorizerValueProvider Interface
The interface that should be implemented by classes used to provide colorizers with values. Colorizer uses these values to determine item colors.
Namespace: DevExpress.XtraTreeMap
Assembly: DevExpress.XtraTreeMap.v20.1.dll
NuGet Package: DevExpress.Win.TreeMap
Declaration
Related API Members
The following members return IColorizerValueProvider objects:
Example
The following example shows how to make a treemap colorizer determine item colors based on the bound data source’s “HPI” row values:
((TreeMapColorizerBase)treeMapControl1.Colorizer).ValueProvider = new ColorizerValueProvider();
//...
public class ColorizerValueProvider : IColorizerValueProvider {
double IColorizerValueProvider.GetValue(IHierarchicalItem item, int itemIndex) {
DataRowView row = item.Tag as DataRowView;
if (row != null)
return (double)row["HPI"];
return 0;
}
}
Note
A complete sample project is available at https://github.com/DevExpress-Examples/treemap-how-to-use-a-custom-value-source-for-a-colorizer
See Also