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/02/25 00:53:45 UTC

[GitHub] [incubator-echarts] MCMcCallum commented on issue #2941: Handling click events on chart grid columns

MCMcCallum commented on issue #2941: Handling click events on chart grid columns
URL: https://github.com/apache/incubator-echarts/issues/2941#issuecomment-590625117
 
 
   One way to do this is to use an invisible graphic as a clickable element that covers the chart area. That is, add the following 'graphic' option to your chart
   ```
   var chart_width = 1000
   var chart_height = 200
   
   function(params) {
     console.log('CLICK')
   }
   
   {graphic: {
     type: 'rect',
     shape: {
       x: 0,
       y: 0,
       height: chart_height,
       width: chart_width
     },
     onclick: onClick,
     invisible: true,
     z: 100
   }}
   ```

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


With regards,
Apache Git Services

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