labels property

dynamic labels

Show labels on each data points or set formatter function for data labels. The formatter function receives 4 arguments such as v, id, i, j and it must return a string that will be shown as the label. The arguments are:

  • v is the value of the data point where the label is shown.
  • id is the id of the data where the label is shown.
  • i is the index of the data point where the label is shown.
  • j is the sub index of the data point where the label is shown. Formatter function can be defined for each data by specifying as an object and D3 formatter function can be set (e.g. d3.format('$'))

Implementation

external dynamic /*bool|{ format: FormatFunction }|{ format: { [key: string]: FormatFunction } }*/ get labels;
void labels=(dynamic v)

Implementation

external set labels(
    dynamic /*bool|{ format: FormatFunction }|{ format: { [key: string]: FormatFunction } }*/ v);