Skip to content

[Lens] Add more number format options #72711

@wylieconlon

Description

@wylieconlon

Lens has a limited set of number formatters, but Kibana already supports a larger set that we should enable in Lens.

Format name Example input Example output Comment
Short number 2000 2k Already has numeral pattern
Duration (must specify input unit, optional output units) 2000, input unit: seconds, output unit: auto 00:33:33 This is converting to hours, minutes, seconds using the numeral formatter
Duration 2000, input unit: milliseconds, output unit: auto 2,000ms (this formatter just applies a ms suffix)
Duration 2000, input unit: seconds, output unit: days Screenshot 2020-07-21 14 44 50 This kind of straight conversion without the "human-readable" part is not one of the default duration formatters, but should be
Bytes (SI) 2000 1.95KiB Using the 0.[00]bb (bytes binary) numeral format
Bytes (1000) 2000 2.00kB Using the 0.[00]bd (bytes decimal) numeral format
Bits (1000) 2000 1.95Kibit Using the 0.[00]bitb numeral format
Bits (1024) 2000 2.00kbit Using the 0.[00]bitd numeral format

The main reason to add these new "duration" and "bytes" options is to make Lens support the most common formats for metrics data, which are not handled well in Kibana overall.

The duration formatter is particularly problematic in Kibana, so Lens has an opportunity to simplify. Most duration units should get displayed with a simple suffix based on the input unit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature:LensTeam:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//enhancementNew value added to drive a business result

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions