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/02/14 01:54:28 UTC

[GitHub] [echarts] plainheart edited a comment on issue #16500: Mouseover on axis labels are not working

plainheart edited a comment on issue #16500:
URL: https://github.com/apache/echarts/issues/16500#issuecomment-1038180419


   You need to set [`xAxis.triggerEvent`](https://echarts.apache.org/en/option.html#xAxis.triggerEvent) as `true`. And here you need to use `event.targetType` to determine if it's triggered by axis labels.
   
   ```js
   chart.on('click', 'xAxis', function(e) {
       // if there are multiple x axes
       // you may use other event params to determine if this event is triggered by the expected axis.
   
       // only handle the events triggered by the label.
       if (e.targetType === 'axisLabel') {
           // do something
       }
   });
   ```


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