You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/04/24 09:46:51 UTC

[GitHub] [echarts] jiawulin001 opened a new pull request, #16939: fix: tooltip content changes with axis extent when 'triggerOn' set to 'click'

jiawulin001 opened a new pull request, #16939:
URL: https://github.com/apache/echarts/pull/16939

   <!-- Please fill in the following information to help us review your PR more efficiently. -->
   
   ## Brief Information
   
   This pull request is in the type of:
   
   - [x] bug fixing
   - [ ] new feature
   - [ ] others
   
   
   
   ### What does this PR do?
   Fix the problem that the tooltip changes as the axis extent changes when `triggerOn` is set to `click`
   
   
   
   ### Fixed issues
   
   
   - fix #16930
   
   
   
   ## Details
   
   ### Before: What was the problem?
   
   When `tooltip.triggerOn` is set to `'click'`, tooltip is expected to stay the same until user clicks another item. But the tool tip content will change with axis extent now after zooming in and slide the axis around. The reason causing this is stated in https://github.com/apache/echarts/issues/16930#issuecomment-1107786045
   
   ![before#16930](https://user-images.githubusercontent.com/14244944/164970031-d3722595-d6a5-4181-97e4-88dfaa163e8e.gif)
   
   
   ### After: How is it fixed in this PR?
   
   The content of tooltip will stay the same until user clicks another item.
   
   
   ![after#16930](https://user-images.githubusercontent.com/14244944/164970476-227c8480-31cd-409d-b12e-7b482f602dcb.gif)
   
   
   
   ## Misc
   
   <!-- ADD RELATED ISSUE ID WHEN APPLICABLE -->
   
   - [ ] 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
   
   N.A.
   
   
   
   ## Others
   
   ### Merging options
   
   - [x] Please squash the commits into a single one when merging.
   
   ### Other information
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] pissang commented on a diff in pull request #16939: fix: tooltip content changes with axis extent when 'triggerOn' set to 'click'

Posted by GitBox <gi...@apache.org>.
pissang commented on code in PR #16939:
URL: https://github.com/apache/echarts/pull/16939#discussion_r859311077


##########
src/component/tooltip/TooltipView.ts:
##########
@@ -257,6 +257,7 @@ class TooltipView extends ComponentView {
             // self.manuallyShowTip({x, y}) might cause tooltip hide,
             // which is not expected.
             && tooltipModel.get('triggerOn') !== 'none'
+            && tooltipModel.get('triggerOn') !== 'click'

Review Comment:
   It will be better to cache the `tooltipModel.get('triggerOn')` to a temporal variable `triggerOn` if there are multiple accesses.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] echarts-bot[bot] commented on pull request #16939: fix: tooltip content changes with axis extent when 'triggerOn' set to 'click'

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on PR #16939:
URL: https://github.com/apache/echarts/pull/16939#issuecomment-1107804907

   Thanks for your contribution!
   The community will review it ASAP. In the meanwhile, please checkout [the coding standard](https://echarts.apache.org/en/coding-standard.html) and Wiki about [How to make a pull request](https://github.com/apache/echarts/wiki/How-to-make-a-pull-request).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] pissang merged pull request #16939: fix: tooltip content changes with axis extent when 'triggerOn' set to 'click'

Posted by GitBox <gi...@apache.org>.
pissang merged PR #16939:
URL: https://github.com/apache/echarts/pull/16939


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] echarts-bot[bot] commented on pull request #16939: fix: tooltip content changes with axis extent when 'triggerOn' set to 'click'

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on PR #16939:
URL: https://github.com/apache/echarts/pull/16939#issuecomment-1111797912

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org