API for classes that implement a color model that returns a color from a data value.
return the color for a given data value.
Parameter | Type | Description |
---|---|---|
value | Number | The data value. |
Optionally initialize the color model from a list of data items and using a function that returns the value used to compute the color for a given item.
Parameter | Type | Description |
---|---|---|
items | Object[] | The data items. |
colorFunc | Function | The function that returns the value used to compute the color for particular data item. |