Skip to content

How to formatted tooltip value? #94

Answered by RafaelCENG
BigFaceMaster asked this question in Q&A
Discussion options

You must be logged in to vote

You can use valueFormatter. From the echarts docs

 tooltip: {
        trigger: "axis",
        valueFormatter: function (params) {
          return `${params}W`;
        },
      },

Now if you want to show only the value for example you can do something like this.

   formatter: function (params) {
          return `${params[0].data}.W`;
        },

Also this is working 100% on single LineChart.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by BigFaceMaster
Comment options

You must be logged in to vote
3 replies
@zhiqingchen
Comment options

@xx732395
Comment options

@zhiqingchen
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants