MAIDR JavaScript API
    Preparing search index...

    Variable defaultFormatConst

    defaultFormat: FormatFunction = ...

    Default format function - converts value to string. Strings pass through unchanged, integers are stringified as-is.

    A fractional number is rounded to DEFAULT_MAX_DECIMALS places, because this is what a screen reader speaks aloud. A value MAIDR computes rather than reads verbatim — a barnorm share, a percentage of a stack — carries the full float, and 57.14285714285714 is sixteen digits to listen through for two digits of meaning.

    Rounding stops at the announcement. Sonification, braille, and extrema all read the underlying numbers, so the pitch of a bar and the position of a braille cell are unchanged; only the spoken text is shortened. An author who needs different precision sets an explicit AxisFormat on the axis, which takes priority over this.

    The value to format

    String representation of the value