Variable SliceLabelFormattersConst

SliceLabelFormatters: {
    Name: SliceLabelFormatter<SliceTypes>;
    NamePlusRelativeValue: SliceLabelFormatter<SliceTypes>;
    NamePlusValue: SliceLabelFormatter<SliceTypes>;
} = ...

Collection of some example implementations of SliceLabelFormatters.

Use with setLabelFormatter

Example usage:

// Use a default implementation
SlicedCharts.setLabelFormatter(SliceLabelFormatters.NamePlusRelativeValue)
// Use a custom implementation
SlicedCharts.setLabelFormatter((slice, relativeValue) => slice.getValue() + ' €')

Type declaration