Interface ShowValuesAsIf

„Show values as“ with options: mode, decimals, own text.

Example

ColumnDef.create({
property: "total", headerLabel: "Share",
showValuesAs: { mode: "percentOfColumnTotal", fractionDigits: 2 } // "66.70%"
});

Since

1.1.95

Hierarchy

  • ShowValuesAsIf

Properties

format?: ((value) => string)

Type declaration

    • (value): string
    • An own text of the shown value (a fraction for percentages, e.g. 0.667). Text only – never HTML.

      Parameters

      • value: number

      Returns string

fractionDigits?: number

Decimals of the text. Default: 1 for percentages, at most 2 otherwise, 0 for rank.

The mode.