Skip to content

[Feature] Tooltip 的 valueFormatter 支持完整的 series 参数回传 #18785

@qmhc

Description

@qmhc

What problem does this feature solve?

现在我有一个图例包含两个系列,其中一个是柱状图 bar 一个是折线图 line,其中柱状图表示了一个具体值(万元),折线图表示进度(%)。

当希望在保持原有 Tooltip 的外观仅格式化 value 带有单位时,由于两个系列的单位不一样,但使用 valueFormatter 的回调函数仅包含 value,无法判断当前值所在的系列。

What does the proposed API look like?

可以考虑增加第二个可选参数,传递对应的完整 series 参数,在保持原 API 不破坏的情况下增强可定制化能力。

Metadata

Metadata

Assignees

No one assigned

    Labels

    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