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/05/26 10:12:46 UTC

[GitHub] [echarts] Nancy2013 opened a new issue, #17117: [Bug] tooltip自定义点击事件,会触发点击穿透

Nancy2013 opened a new issue, #17117:
URL: https://github.com/apache/echarts/issues/17117

   ### Version
   
   5.3.2
   
   ### Link to Minimal Reproduction
   
   _No response_
   
   ### Steps to Reproduce
   
   1、生成折线图
   2、设置tooltip显示
   3、自定义tooltip里面的dom样式
   4、在tooltip中添加了自定义事件onclick
   5、点击tooltip中的自定义事件,触发其他操作
   
   
   
   ### Current Behavior
   
   当tooltip显示,且下面有遮挡的item圆点时,点击tooltip中的自定义事件,导致点击穿透,触发到下面的item事件,且设置tooltip的hideDelay属性,延迟tooltip隐藏,也不能阻止点击穿透
   
   ### Expected Behavior
   
   tooltip里的自定义点击事件,如何才能阻止点击事件穿透,不要点击到下面遮挡的折线图上的item圆点
   
   ### Environment
   
   ```markdown
   OS:iPhoneX
   Browser: Chrome 101.0.4951.67
   Framework :Vue2
   ```
   
   
   ### Any additional comments?
   
   _No response_


-- 
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.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 issue #17117: [Bug] tooltip自定义点击事件,会触发点击穿透

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #17117:
URL: https://github.com/apache/echarts/issues/17117#issuecomment-1138617333

   @Nancy2013 Please provide a demo for the issue either with [Official Editor](https://echarts.apache.org/examples/editor.html), [CodePen](https://codepen.io/Ovilia/pen/dyYWXWM), [CodeSandbox](https://codesandbox.io/s/echarts-basic-example-template-mpfz1s) or [JSFiddle](https://jsfiddle.net/plainheart/e46ozpqj/7/).


-- 
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] tyn1998 commented on issue #17117: [Bug] tooltip自定义点击事件,会触发点击穿透

Posted by GitBox <gi...@apache.org>.
tyn1998 commented on issue #17117:
URL: https://github.com/apache/echarts/issues/17117#issuecomment-1139296422

   Hi, @Nancy2013 .
   
   前几天我也遇到过这样的需求,echarts实例的on方法还可以有第二个参数叫query,可以做一些过滤,你可以试试看~
   
   ```javascript
     chart.on('click', 'series', function () {...});
     chart.on('click', 'series.line', function () {...});
     chart.on('click', 'xAxis.category', function () {...});
   ```
   https://echarts.apache.org/zh/api.html#echartsInstance.on


-- 
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] Nancy2013 commented on issue #17117: [Bug] tooltip自定义点击事件,会触发点击穿透

Posted by GitBox <gi...@apache.org>.
Nancy2013 commented on issue #17117:
URL: https://github.com/apache/echarts/issues/17117#issuecomment-1139303521

   > > 在tooltip中添加了自定义事件onclick
   > 
   > 可不可以补充一个demo例子,我可以帮忙试试看~
   
   demo:
   https://codepen.io/nancy2013/pen/mdXpWmO?editors=0111
   
   定位发现,在移动端才会出现这个问题,目前是添加了tooltip的{ enterable:false },可以解决点击穿透问题。
   但是点击之后,tooltip不会自动隐藏


-- 
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] fitterfly-parth commented on issue #17117: [Bug] tooltip自定义点击事件,会触发点击穿透

Posted by GitBox <gi...@apache.org>.
fitterfly-parth commented on issue #17117:
URL: https://github.com/apache/echarts/issues/17117#issuecomment-1235413652

   I do all this step but my tooltip is not hide any idea?


-- 
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 issue #17117: [Bug] tooltip自定义点击事件,会触发点击穿透

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #17117:
URL: https://github.com/apache/echarts/issues/17117#issuecomment-1138376265

   @Nancy2013 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
   <details><summary><b>TRANSLATED</b></summary><br>
   
   **TITLE**
   
   [Bug] tooltip custom click event will trigger click penetration
   
   **BODY**
   
   ### Version
   
   5.3.2
   
   ### Link to Minimal Reproduction
   
   _No response_
   
   ### Steps to Reproduce
   
   1. Generate line charts
   2. Set the tooltip display
   3. Customize the dom style inside the tooltip
   4. Added custom event onclick in tooltip
   5. Click on the custom event in tooltip to trigger other actions
   
   ### Current Behavior
   
   When the tooltip is displayed and there is an occluded item dot below, clicking on the custom event in the tooltip causes the click to penetrate, triggers the item event below, and sets the hideDelay property of the tooltip, delays the hidden tooltip, and cannot prevent the click penetration
   
   ### Expected Behavior
   
   Custom click events in tooltip, how to prevent click events from penetrating, do not click on the item dot on the line chart below
   
   ### Environment
   
   ```markdown
   OS:iPhoneX
   Browser: Chrome 101.0.4951.67
   Framework :Vue2
   ```
   
   ### Any additional comments?
   
   _No response_
   </details>


-- 
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] tyn1998 commented on issue #17117: [Bug] tooltip自定义点击事件,会触发点击穿透

Posted by GitBox <gi...@apache.org>.
tyn1998 commented on issue #17117:
URL: https://github.com/apache/echarts/issues/17117#issuecomment-1139297658

   > 在tooltip中添加了自定义事件onclick
   
   可不可以补充一个demo例子,我可以帮忙试试看~


-- 
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] Nancy2013 closed issue #17117: [Bug] tooltip自定义点击事件,会触发点击穿透

Posted by GitBox <gi...@apache.org>.
Nancy2013 closed issue #17117: [Bug] tooltip自定义点击事件,会触发点击穿透
URL: https://github.com/apache/echarts/issues/17117


-- 
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] tyn1998 commented on issue #17117: [Bug] tooltip自定义点击事件,会触发点击穿透

Posted by GitBox <gi...@apache.org>.
tyn1998 commented on issue #17117:
URL: https://github.com/apache/echarts/issues/17117#issuecomment-1139323699

   嗯,我感觉需要在tooltip里做点击的情况应该是要把enterable打开的。
   
   电脑上因为鼠标有hover事件,所以鼠标经过tooltip就出现,移走就消失;但是移动端没有hover这个操作,只能靠点击来控制显示/隐藏,所以是不支持自动隐藏的。


-- 
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] Nancy2013 commented on issue #17117: [Bug] tooltip自定义点击事件,会触发点击穿透

Posted by GitBox <gi...@apache.org>.
Nancy2013 commented on issue #17117:
URL: https://github.com/apache/echarts/issues/17117#issuecomment-1139329594

   需求是tooltip里的点击事件,可以修改拐点item的Y轴值,tooltip不隐藏,拐点的Y轴值修改后,tooltip不会同步更新位置
   
   现在就是在点击事件里,手动触发了tooltip的隐藏,和折线拐点的取消高亮事件,解决这个问题
   dispatchAction({
       type: 'hideTip'
   })
   
   dispatchAction({
       type: 'downplay',
   })


-- 
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