Format Fraction Content Generator
class FormatFractionContentGenerator(numberFormat: <Error class: unknown class> = 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
Constructors
Functions
Link copied to clipboard
open override fun generateContent(tag: <Error class: unknown class>, value: Number, bounds: Bounds<out Number>)