Skip to content

feat(tooltip): Allow tooltips to disable transform positioning#16091

Closed
scttcper wants to merge 1 commit into
apache:masterfrom
scttcper:tooltip-positioning
Closed

feat(tooltip): Allow tooltips to disable transform positioning#16091
scttcper wants to merge 1 commit into
apache:masterfrom
scttcper:tooltip-positioning

Conversation

@scttcper
Copy link
Copy Markdown

@scttcper scttcper commented Nov 23, 2021

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

In #14246 echarts v5 css transform was made the default for positioning tooltips based on if the browser is modern. We'd like to be able to switch back to the old left, top absolute positioning as we've found that transform is slower when attempting to follow the cursor. After removing the new drop-shadow, its close but still not nearly as performant when scrubbing quickly.

echarts v4

Layouts per second - 300

Kapture.2021-11-22.at.16.52.01.mp4

echarts v5.2.2 with tooltip dropshadow removed

Layouts per second - 170

Kapture.2021-11-22.at.16.51.41.mp4

Fixed issues

Details

Before: What was the problem?

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

NA.

Others

Merging options

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

Other information

@echarts-bot
Copy link
Copy Markdown

echarts-bot Bot commented Nov 23, 2021

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.

@pissang pissang requested a review from plainheart November 23, 2021 01:03
@scttcper scttcper changed the title feat: Allow tooltips to disable transform positioning feat(tooltip): Allow tooltips to disable transform positioning Nov 23, 2021
@plainheart
Copy link
Copy Markdown
Member

plainheart commented Nov 23, 2021

What you are expecting is to get the tooltip closely followed with the mouse, that is, hope it has no delay, right? Because the position is updated frequently in a short duration, we throttled the tooltip's trigger frequency in #15683 to solve the shaking and lagging issue in the connected charts or when the devtools is open. In such a case you mentioned, it may be a good choice to set tooltip.transitionDuration to be 0. But it seems the new change also brings some negative effects. It appears a bit lagging when transitionDuration is 0, which is not good as v5.2.0 or earlier.

@scttcper
Copy link
Copy Markdown
Author

scttcper commented Nov 23, 2021

@plainheart yes, exactly. we're using transitionDuration: 0 and looking to closely follow the mouse. I'll take a look at that debounce

@scttcper
Copy link
Copy Markdown
Author

scttcper commented Nov 23, 2021

Opened #16101 instead, it does seem to be that throttle function, but removing it does trigger the dev tools issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants