function(object, defaultLabel, extraConfig)
By default, no label is shown.
A function that determines the label that's rendered inside an object on the chart. Can be based on
object.selectable or on other criteria.
The size of an object label is calculated automatically, based on the size of the object. For tables and booths, there usually is more than enough space. For seats, however, you'll probably want to limit the label to 3 characters maximum, or else the label will become too small to read without zooming in.
Multi-line labels are not supported.
The parameters that are passed to objectLabel are:
- object: The current object.
- defaultLabel: The default object label (i.e. an empty string).
- extraConfig: Variables and data from your application. See extraConfig.
This function is called inside the Seats.io iFrame and cannot access variables defined in the scope of your application. To do so, pass them first through the extraConfig configuration parameter.
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.
To show seat labels, pass in
objectLabel: object => object.labels.own