Type: function(object, defaultColor, extraConfig)
Default: Grey if the object is not available for selection, the category color otherwise.
A function that determines the object color. Can be based on
object.isSelectable() or on other criteria.
By default, selectable objects are shown in their category color, and other objects are rendered grey.
Your implementation of
objectColor must return a CSS string (e.g. 'red' or '#ccc').
The parameters that are passed to objectColor are:
- object: the current object
- defaultColor: the default object color
- extraConfig: see extraConfig
this function is called for each object on the chart; make sure it's fast, or chart rendering times will suffer. Avoid using slow methods such as Array.indexOf. Read more here.