Skip to content

折线图 多次setoption后 鼠标hover悬停位置的tooltip无法实时更新数据 #15188

@afanso

Description

@afanso

Version

5.1.1

Steps to reproduce

tooltip: {
          trigger: "axis",
          formatter(params) {
            let cumulative = "0";
            if (params[0].value[1] >= 1000000000) {
              cumulative = (params[0].value[1] / 1000000000).toFixed(2)   "B";
            } else if (params[0].value[1] >= 1000000) {
              cumulative = (params[0].value[1] / 1000000).toFixed(2)   "M";
            } else if (params[0].value[1] >= 1000) {
              cumulative = (params[0].value[1] / 1000).toFixed(2)   "K";
            } else {
              cumulative = parseFloat(params[0].value[1]).toFixed(2)   "";
            }
            let text = `委托价<br />${params[0].value[0]}<br />累计<br />${cumulative}`;
            return text;
          },

What is expected?

应该在setoption后,tooltip应能实时更新对应位置的数据

What is actually happening?

无法更新,只显示在第一次选中的数据

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