Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tootip 如何优美的格式化金额、百分比值 #15430

Closed
crazyair opened this issue Jul 29, 2021 · 3 comments
Closed

tootip 如何优美的格式化金额、百分比值 #15430

crazyair opened this issue Jul 29, 2021 · 3 comments

Comments

@crazyair
Copy link

What problem does this feature solve?

image

What does the proposed API look like?

这里显示的值想要 formatter 格式化为不同格式,但是只有 tooltip.formatter 拼接整个 html,但是一般情况下只需要修改值的格式,不需要改其他内容,想要实现如下 API

        tooltip: {
            formatter: data => {
                return { name: data.type, value: `${data.value}%` };
            },
        },
@echarts-bot
Copy link

echarts-bot bot commented Jul 29, 2021

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that it contains a minimum reproducible demo and necessary images to illustrate. Otherwise, our committers will ask you to do so.

A minimum reproducible demo should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.

You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to [email protected]. Please attach the issue link if it's a technical question.

If you are interested in the project, you may also subscribe our mailing list.

Have a nice day! 🍵

@echarts-bot echarts-bot bot added new-feature pending We are not sure about whether this is a bug/new feature. waiting-for: community labels Jul 29, 2021
@echarts-bot
Copy link

echarts-bot bot commented Jul 29, 2021

@crazyair It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people, we'd like to suggest using English next time. 🤗

TRANSLATED

TITLE

tootip If beautifully formatted amount, percentage value

BODY

What problem does this feature solve?

image

What does the proposed API look like?

The values shown here want formatter formatted to be formatted in different formats, but only tooltip.formatter stitches the entire html, but in general only need to modify the format of the value, do not need to change anything else, want to implement the following API

        tooltip: {
            formatter: data => {
                return { name: data.type, value: `${data.value}%` };
            },
        },

@pissang pissang removed pending We are not sure about whether this is a bug/new feature. waiting-for: community labels Jul 30, 2021
@pissang pissang added this to the 5.3 milestone Jul 30, 2021
@crazyair crazyair changed the title tootip 如果优美的格式化金额、百分比值 tootip 如何优美的格式化金额、百分比值 Jul 30, 2021
@Ovilia
Copy link
Contributor

Ovilia commented Oct 8, 2021

Please follow #14962.

@Ovilia Ovilia closed this as completed Oct 8, 2021
@Ovilia Ovilia removed this from the 5.3 milestone Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants