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 2020/06/03 19:40:02 UTC

[GitHub] [incubator-echarts] JivanRoquet opened a new issue #12751: Tooltip with trigger: 'item' doesn't work properly with area charts

JivanRoquet opened a new issue #12751:
URL: https://github.com/apache/incubator-echarts/issues/12751


   ### Version
   4.8.0
   
   ### Reproduction link
   [http://jsfiddle.net/o41fhjLq/1/](http://jsfiddle.net/o41fhjLq/1/)
   
   ### Steps to reproduce
   - create a line chart with `areaStyle: {}` and `tooltip: { trigger: 'item' }`
   - hover exactly over the top line: tooltip is displayed
   - hover over the area under the curve tooltip is NOT displayed
   
   ### What is expected?
   When using a BAR chart, hovering over any part of a bar triggers the tooltip. It should behave exactly the same with an AREA chart.
   
   The only way to use a tooltip with an area chart currently is to use `trigger: 'axis'` which is not necessarily the desired option.
   
   ### What is actually happening?
   When in trigger: `item` mode, the tooltip does NOT display when hovering over a filled area part of an area chart.
   
   The only way to display the tooltip is to hover EXACTLY over a data point which is extremely impractical, and even impossible in the case of smaller charts with many data points.
   
   ---
   An area chart is not a glorified line chart with some visual filling: it's a proper type of chart and comes with functional requirements: one of them is that hovering over a filled area should definitely trigger the tooltip, not only hovering over the exact line on one of the data points.
   
   In an area chart, the filled area underneath the curve should absolutely be reactive to the mouse cursor and trigger a tooltip.
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


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

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] [incubator-echarts] JivanRoquet edited a comment on issue #12751: Tooltip with trigger: 'item' doesn't work properly with area charts

Posted by GitBox <gi...@apache.org>.
JivanRoquet edited a comment on issue #12751:
URL: https://github.com/apache/incubator-echarts/issues/12751#issuecomment-639104353


   @plainheart with a bar chart, the data item is (rightly) considered to be the whole bar in itself, not only the top of it. Likewise, with an area chart, the data item should be considered to be the area itself, not only the top of it.


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

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] [incubator-echarts] plainheart commented on issue #12751: Tooltip with trigger: 'item' doesn't work properly with area charts

Posted by GitBox <gi...@apache.org>.
plainheart commented on issue #12751:
URL: https://github.com/apache/incubator-echarts/issues/12751#issuecomment-638536015


   It may be not a bug. `tooltip.trigger = item` means that tooltip will be triggered by data item.
   I think here it might be better for you to use `tooltip.trigger = axis` and hide the axis pointer with option
   ```js
   axisPointer: {
      type: 'none'
   }
   ```


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

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] [incubator-echarts] JivanRoquet commented on issue #12751: Tooltip with trigger: 'item' doesn't work properly with area charts

Posted by GitBox <gi...@apache.org>.
JivanRoquet commented on issue #12751:
URL: https://github.com/apache/incubator-echarts/issues/12751#issuecomment-639104353


   @plainheart with a bar chart, the data item is considered to be the whole bar in itself, not only the top of it. Likewise, with an area chart, the data item should be considered to be the area itself, not only the top of it.


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

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