Format Fraction Content Generator
class FormatFractionContentGenerator(numberFormat: Intl.NumberFormat = numberFormat {
style = "percent"
}) : ContentGenerator<Number>
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
number Format
the number format to be used. Defaults to formatting as percentage