Skip to main content

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.v24.2.dll

Declaration

public interface IColorizerValueProvider

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;
    }
}
See Also