Skip to content

[PROPOSAL] More powerful formatters: pipes #11878

@Ovilia

Description

@Ovilia

What problem does this feature solve?

ECharts has many formatter options, which provides a flexible display method in both forms of string and function.

In some cases, function is not applicative, like formatters in theme or in Baidu Smart App.
So, I'd suggest we provide some frequently used pipes so that users can use it in string format.

What does the proposed API look like?

  • {a | thousandSeparator} kg: if {a} is 1234567, the output is 1,234,567 kg.
  • {b | decimalPlaces: 2}cm: if {b} is 12.3456, the output is 12.34cm.
  • ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussion-requiredFurther discussion is required before we decide if this issue should be fixed.enThis issue is in Englishnew-featurestaleInactive for a long time. Will be closed in 7 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions