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

feat(axis): support tooltip for axis label #16315

Merged
merged 2 commits into from
Nov 24, 2024
Merged

Conversation

plainheart
Copy link
Member

@plainheart plainheart commented Jan 4, 2022

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Support tooltip for the axis label. It's useful for the case in which the axis label is truncated for long text and hope to show the full text when hovering on the label.

Fixed issues

Details

Before: What was the problem?

No tooltip for showing the full text of a truncated axis label. The developer has to simulate a tooltip via listening to the mouse event like https://codepen.io/plainheart/pen/jOGBrmJ.

After: How is it fixed in this PR?

Misc

  • The API has been changed (apache/echarts-doc#xxx).
  • This PR depends on ZRender changes (ecomfe/zrender#xxx).

Related test cases or examples to use the new APIs

Please refer to the last test case in test/axisLabel.html.

Others

Merging options

  • Please squash the commits into a single one when merging.

Other information

@echarts-bot
Copy link

echarts-bot bot commented Jan 4, 2022

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

The pull request is marked to be PR: author is committer because you are a committer of this project.

@Thj007
Copy link

Thj007 commented Jul 17, 2022

怎么使用呢?

@plainheart
Copy link
Member Author

@Thj007 可以参考 PR 里附加的测试用例 test/axisLabel.html

@plainheart plainheart requested review from Ovilia and pissang August 13, 2022 02:24
@Ovilia Ovilia modified the milestones: 5.4, 5.4.1 Sep 1, 2022
Ovilia
Ovilia previously approved these changes Sep 2, 2022
Copy link
Contributor

@Ovilia Ovilia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried with the test case and it looks cool. LGTM

@echarts-bot
Copy link

echarts-bot bot commented Sep 2, 2022

To reviewers: If this PR is going to be described in the changelog in the future release, please make sure this PR has one of the following labels: PR: doc ready, PR: awaiting doc, PR: doc unchanged

This message is shown because the PR description doesn't contain the document related template.

@Ovilia
Copy link
Contributor

Ovilia commented Sep 2, 2022

@pissang Please double-click this PR.

@plainheart I think a new option is probably required? Please check the "The API has been changed" and prepare the document later.

@Ovilia Ovilia requested a review from 100pah September 22, 2022 09:59
@plainheart plainheart changed the base branch from next to master October 8, 2022 09:16
@plainheart plainheart added the discussion-required Further discussion is required before we decide if this issue should be fixed. label Oct 14, 2022
@plainheart plainheart modified the milestones: 5.4.1, 5.5.0 Nov 10, 2022
@plainheart plainheart removed this from the 5.5.0 milestone Feb 25, 2023
Copy link
Contributor

github-actions bot commented Apr 29, 2024

The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-16315@15a8f64

@plainheart plainheart modified the milestones: TBD, 5.5.1 Apr 29, 2024
@Ovilia Ovilia modified the milestones: 5.5.1, 5.5.2 Jun 28, 2024
@plainheart plainheart changed the title feat(axis): support tooltip for axis label. feat(axis): support tooltip for axis label Jul 17, 2024
@shenxiang216
Copy link

期待看到该功能的合并!

@tracyfarah
Copy link

@pissang @100pah can we please merge this thanks :)

@FirstVertex
Copy link

Please, let's do it! We have the same requirement about tooltip on Axis label only whey they are overflowed. Thanks!

src/component/axis/AxisBuilder.ts Outdated Show resolved Hide resolved
src/component/axis/AxisBuilder.ts Show resolved Hide resolved
@plainheart plainheart force-pushed the feat/axis-label-tooltip branch from 155653f to 8f7773c Compare November 23, 2024 01:55
@plainheart plainheart removed the discussion-required Further discussion is required before we decide if this issue should be fixed. label Nov 23, 2024
@plainheart plainheart merged commit 8924cb5 into master Nov 24, 2024
2 checks passed
Copy link

echarts-bot bot commented Nov 24, 2024

Congratulations! Your PR has been merged. Thanks for your contribution! 👍

@plainheart plainheart deleted the feat/axis-label-tooltip branch November 24, 2024 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants