echarts icon indicating copy to clipboard operation
echarts copied to clipboard

feat(axis): support tooltip for axis label

Open plainheart opened this issue 3 years ago • 10 comments

Brief Information

This pull request is in the type of:

  • [ ] bug fixing
  • [x] 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

  • #11903
  • #15299
  • #16228

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

plainheart avatar Jan 04 '22 02:01 plainheart

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.

echarts-bot[bot] avatar Jan 04 '22 02:01 echarts-bot[bot]

怎么使用呢?

Thj007 avatar Jul 17 '22 07:07 Thj007

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

plainheart avatar Jul 17 '22 13:07 plainheart

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.

echarts-bot[bot] avatar Sep 02 '22 07:09 echarts-bot[bot]

@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 avatar Sep 02 '22 07:09 Ovilia

This is a very needed feature ! Thanks for your work.

ghost avatar May 12 '23 17:05 ghost

Looking forward to seeing this feature merged in!

2nPlusOne avatar Apr 26 '24 21:04 2nPlusOne

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

github-actions[bot] avatar Apr 29 '24 01:04 github-actions[bot]

期待看到该功能的合并!

shenxiang216 avatar Jul 17 '24 07:07 shenxiang216