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

[Feature] Unable to show tooltip for the title if the title name is too long #20062

Open
deb523 opened this issue Jun 21, 2024 · 3 comments
Open
Labels
en This issue is in English new-feature pending We are not sure about whether this is a bug/new feature.

Comments

@deb523
Copy link

deb523 commented Jun 21, 2024

What problem does this feature solve?

If the title is too long, it overlaps on the gauge and doesn't look good.

What does the proposed API look like?

title: {
offsetCenter: [
.
.
],
.
overflow: 'truncate',
tooltip: {
    position: , 
    formatter: ,
    .
    .
 }
}

UX:

Need a tooltip on hover of Total People... so that the entire text could be shown to the end user.

Screenshot 2024-06-21 at 6 31 52 PM


PS, would be following up from my personal Github as well: https://github.com/debnathSD

@echarts-bot echarts-bot bot added en This issue is in English pending We are not sure about whether this is a bug/new feature. labels Jun 21, 2024
@helgasoft
Copy link

I don't think there is a tooltip for the title. The only tooltip is for the pointer - Demo.

@deb523
Copy link
Author

deb523 commented Jun 25, 2024

I don't think there is a tooltip for the title. The only tooltip is for the pointer - Demo.

Understood.

I have implemented the same for pointer but I was just wondering whether it could be implemented / added as a new feature for the title as well - as there could be titles (having this use case) which are lengthy.

@plainheart
Copy link
Member

plainheart commented Jul 1, 2024

@deb523 I'm not sure if showing a tooltip on the title is common, but it should be able to be implemented like the legend component. If you think it is worth and you are interested in this feature, feel free to open a PR.

And this might be similar to #16315. The feature should allow the developer to detect if the text is overflow and decide whether to show the tooltip and the content to show.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
en This issue is in English new-feature pending We are not sure about whether this is a bug/new feature.
Projects
None yet
Development

No branches or pull requests

3 participants