Function formatShowValuesAs

  • The text of a shown value: percentages with one decimal ("66.7%"), ranks without decimals, differences and running totals like totals ("1,234.5"). Not a number → "".

    Parameters

    • value: unknown

      the shown value (a fraction for percentages)

    • config: ShowValuesAsConfig

      the configuration of the column

    Returns string

    the text

    Example

    formatShowValuesAs(0.667, "percentOfColumnTotal");                          // "66.7%"
    formatShowValuesAs(0.667, { mode: "percentOfColumnTotal", fractionDigits: 2 }); // "66.70%"

    Since

    1.1.95