FormatFractionContentGenerator
class FormatFractionContentGenerator(numberFormat: Intl.NumberFormat = numberFormat {
style = "percent"
}) : ContentGenerator<Number> (source)
Uses a Intl.NumberFormat
to format the fraction of a value within bounds. E.g. if value = 2, bounds=1,10, then the fraction is 0.2 which is formatted using a given numberFormat
.
Parameters
numberFormat
the number format to be used. Defaults to formatting as percentage