759325100 opened a new issue #9103: symbol使用path指定矢量图形后,tooltip无法正常触发
URL: https://github.com/apache/incubator-echarts/issues/9103
 
 
   <!--
   为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。
   -->
   
   
   ### One-line summary [问题简述]
   
使用graph图的layout为circular的布局情况下,自定义data中的symbol为矢量图形,大小设置为50,但是当我将鼠标放置到symbol区域上的时候,仅当svg路径上有元素的时候才有tooltip,放到空白区域不显示,这样非常不友好,是否可以解决(因为需要动态颜色,所以无法使用image)
   
   
   
   
   ### Version & Environment [版本及环境]
   + ECharts version [ECharts 版本]: 3.3.1
   + Browser version [浏览器类型和版本]:chrome  67.0.3396.99
   + OS Version [操作系统类型和版本]:window 10
   
   
   
   
   
   ### Expected behaviour [期望结果]
   鼠标只要放置到item区域,就显示tooltip。而不是现在的必须放在path绘制的那一圈圆环上
   
   
   
   
   ### ECharts option [ECharts配置项]
   <!-- Copy and paste your 'echarts option' here. -->
   <!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 
option。如何得到能运行的 option 参见上方的 guidelines for contributing] -->
   ```javascript
   option = {
       "title": {
           "text": "数据总览",
           "subtext": "区域及设备状态",
           "top": 0,
           "left": "right"
       },
       "tooltip": {},
       "backgroundColor": "#ffffff",
       "animationDuration": 1000,
       "animationEasingUpdate": "quinticInOut",
       "series": [{
           "name": "区域概览",
           "type": "graph",
           "ribbonType": true,
           "layout": "circular",
           "circular": {
               "rotateLabel": true
           },
           "roam": true,
           "focusNodeAdjacency": true,
           "data": [{
               "id": 73,
   
               "name": "创客中心",
               "category": "Great",
               "symbolSize": 50,
               "symbol": "",
               "itemStyle": {
                   "borderColor": "#000",
                   "borderWidth": 5
               },
               "disabled": true
           }, {
               "id": "1_161",
               "name": "创客中心",
               "parentid": 73,
               "category": "Great",
               "symbolSize": 50,
               "symbol": "path://M480 64C250.24 64 64 250.24 64 480 64 709.76 
250.24 896 480 896c229.76 0 416-186.24 416-416C896 250.24 709.76 64 480 64zM480 
832C285.44 832 128 674.56 128 480 128 285.44 285.44 128 480 128 674.56 128 832 
285.44 832 480 832 674.56 674.56 832 480 832z",
               "itemStyle": {
                   "borderColor": "#000",
                   "borderWidth": 5
               }
           }, {
               "id": "light_214",
               "name": "Light One",
               "parentid": "1_161",
               "category": "Great",
               "symbolSize": 50,
               "symbol": "path://M480 64C250.24 64 64 250.24 64 480 64 709.76 
250.24 896 480 896c229.76 0 416-186.24 416-416C896 250.24 709.76 64 480 64zM480 
832C285.44 832 128 674.56 128 480 128 285.44 285.44 128 480 128 674.56 128 832 
285.44 832 480 832 674.56 674.56 832 480 832z",
               "itemStyle": {
                   "borderColor": "#000",
                   "borderWidth": 5
               }
           }, {
               "id": "light_215",
               "name": "Light Two",
               "parentid": "1_161",
               "category": "Great",
               "symbolSize": 50,
               "symbol": "path://M480 64C250.24 64 64 250.24 64 480 64 709.76 
250.24 896 480 896c229.76 0 416-186.24 416-416C896 250.24 709.76 64 480 64zM480 
832C285.44 832 128 674.56 128 480 128 285.44 285.44 128 480 128 674.56 128 832 
285.44 832 480 832 674.56 674.56 832 480 832z",
               "itemStyle": {
                   "borderColor": "#000",
                   "borderWidth": 5
               }
           }, {
               "id": "light_218",
               "name": "Light Three",
               "parentid": "1_161",
               "category": "Great",
               "symbolSize": 50,
               "symbol": "path://M480 64C250.24 64 64 250.24 64 480 64 709.76 
250.24 896 480 896c229.76 0 416-186.24 416-416C896 250.24 709.76 64 480 64zM480 
832C285.44 832 128 674.56 128 480 128 285.44 285.44 128 480 128 674.56 128 832 
285.44 832 480 832 674.56 674.56 832 480 832z",
               "itemStyle": {
                   "borderColor": "#000",
                   "borderWidth": 5
               }
           }, {
               "id": "light_219",
   
               "name": "Light Four",
               "parentid": "1_161",
               "category": "Great",
               "symbolSize": 50,
               "symbol": "path://M480 64C250.24 64 64 250.24 64 480 64 709.76 
250.24 896 480 896c229.76 0 416-186.24 416-416C896 250.24 709.76 64 480 64zM480 
832C285.44 832 128 674.56 128 480 128 285.44 285.44 128 480 128 674.56 128 832 
285.44 832 480 832 674.56 674.56 832 480 832z",
               "itemStyle": {
                   "borderColor": "#000",
                   "borderWidth": 5
               }
           }, {
               "id": "aircon_62",
               "parentid": "1_161",
               "category": "Great",
               "symbolSize": 50,
               "symbol": "path://M480 64C250.24 64 64 250.24 64 480 64 709.76 
250.24 896 480 896c229.76 0 416-186.24 416-416C896 250.24 709.76 64 480 64zM480 
832C285.44 832 128 674.56 128 480 128 285.44 285.44 128 480 128 674.56 128 832 
285.44 832 480 832 674.56 674.56 832 480 832z",
               "itemStyle": {
                   "borderColor": "#000",
                   "borderWidth": 5
               }
           }, {
               "id": "switch_63",
               "parentid": "1_161",
               "category": "Great",
               "symbolSize": 50,
               "symbol": "path://M480 64C250.24 64 64 250.24 64 480 64 709.76 
250.24 896 480 896c229.76 0 416-186.24 416-416C896 250.24 709.76 64 480 64zM480 
832C285.44 832 128 674.56 128 480 128 285.44 285.44 128 480 128 674.56 128 832 
285.44 832 480 832 674.56 674.56 832 480 832z",
               "itemStyle": {
                   "borderColor": "#000",
                   "borderWidth": 5
               }
           }, {
               "id": "switch_64",
               "parentid": "1_161",
               "category": "Great",
               "symbolSize": 50,
               "symbol": "path://M480 64C250.24 64 64 250.24 64 480 64 709.76 
250.24 896 480 896c229.76 0 416-186.24 416-416C896 250.24 709.76 64 480 64zM480 
832C285.44 832 128 674.56 128 480 128 285.44 285.44 128 480 128 674.56 128 832 
285.44 832 480 832 674.56 674.56 832 480 832z",
               "itemStyle": {
                   "borderColor": "#000",
                   "borderWidth": 5
               }
           }, {
               "id": "switch_65",
               "parentid": "1_161",
               "category": "Great",
               "symbolSize": 50,
               "symbol": "path://M480 64C250.24 64 64 250.24 64 480 64 709.76 
250.24 896 480 896c229.76 0 416-186.24 416-416C896 250.24 709.76 64 480 64zM480 
832C285.44 832 128 674.56 128 480 128 285.44 285.44 128 480 128 674.56 128 832 
285.44 832 480 832 674.56 674.56 832 480 832z",
               "itemStyle": {
                   "borderColor": "#000",
                   "borderWidth": 5
               }
           }, {
               "id": "colorbar_66",
               "parentid": "1_161",
               "category": "None",
               "symbolSize": 50,
               "symbol": "path://M480 64C250.24 64 64 250.24 64 480 64 709.76 
250.24 896 480 896c229.76 0 416-186.24 416-416C896 250.24 709.76 64 480 64zM480 
832C285.44 832 128 674.56 128 480 128 285.44 285.44 128 480 128 674.56 128 832 
285.44 832 480 832 674.56 674.56 832 480 832z",
               "itemStyle": {
                   "borderColor": "#000",
                   "borderWidth": 5
               }
           }, {
               "id": "airpure_67",
               "parentid": "1_161",
               "category": "Great",
               "symbolSize": 50,
               "symbol": "path://M480 64C250.24 64 64 250.24 64 480 64 709.76 
250.24 896 480 896c229.76 0 416-186.24 416-416C896 250.24 709.76 64 480 64zM480 
832C285.44 832 128 674.56 128 480 128 285.44 285.44 128 480 128 674.56 128 832 
285.44 832 480 832 674.56 674.56 832 480 832z",
               "itemStyle": {
                   "borderColor": "#000",
                   "borderWidth": 5
               }
           }, {
               "id": "curtain_68",
               "parentid": "1_161",
               "category": "Great",
               "symbolSize": 50,
               "symbol": "path://M480 64C250.24 64 64 250.24 64 480 64 709.76 
250.24 896 480 896c229.76 0 416-186.24 416-416C896 250.24 709.76 64 480 64zM480 
832C285.44 832 128 674.56 128 480 128 285.44 285.44 128 480 128 674.56 128 832 
285.44 832 480 832 674.56 674.56 832 480 832z",
               "itemStyle": {
                   "borderColor": "#000",
                   "borderWidth": 5
               }
           }, {
               "id": "curtain_69",
               "parentid": "1_161",
               "category": "Great",
               "symbolSize": 50,
               "symbol": "path://M480 64C250.24 64 64 250.24 64 480 64 709.76 
250.24 896 480 896c229.76 0 416-186.24 416-416C896 250.24 709.76 64 480 64zM480 
832C285.44 832 128 674.56 128 480 128 285.44 285.44 128 480 128 674.56 128 832 
285.44 832 480 832 674.56 674.56 832 480 832z",
               "itemStyle": {
                   "borderColor": "#000",
                   "borderWidth": 5
               }
           }, {
               "id": "curtain_70",
               "parentid": "1_161",
               "category": "Great",
               "symbolSize": 50,
               "symbol": "path://M480 64C250.24 64 64 250.24 64 480 64 709.76 
250.24 896 480 896c229.76 0 416-186.24 416-416C896 250.24 709.76 64 480 64zM480 
832C285.44 832 128 674.56 128 480 128 285.44 285.44 128 480 128 674.56 128 832 
285.44 832 480 832 674.56 674.56 832 480 832z",
               "itemStyle": {
                   "borderColor": "#000",
                   "borderWidth": 5
               }
           }, {
               "id": "switch_75",
               "parentid": "1_161",
               "category": "Great",
               "symbolSize": 50,
               "symbol": "path://M480 64C250.24 64 64 250.24 64 480 64 709.76 
250.24 896 480 896c229.76 0 416-186.24 416-416C896 250.24 709.76 64 480 64zM480 
832C285.44 832 128 674.56 128 480 128 285.44 285.44 128 480 128 674.56 128 832 
285.44 832 480 832 674.56 674.56 832 480 832z",
               "itemStyle": {
                   "borderColor": "#000",
                   "borderWidth": 5
               }
           }, {
   
               "id": "sensor_161130",
               "name": "超级传感器",
               "parentid": "1_161",
               "category": "Great",
               "symbolSize": 50,
               "symbol": "path://M480 64C250.24 64 64 250.24 64 480 64 709.76 
250.24 896 480 896c229.76 0 416-186.24 416-416C896 250.24 709.76 64 480 64zM480 
832C285.44 832 128 674.56 128 480 128 285.44 285.44 128 480 128 674.56 128 832 
285.44 832 480 832 674.56 674.56 832 480 832z",
               "itemStyle": {
                   "borderColor": "#000",
                   "borderWidth": 5
               }
           }, {
               "id": "1_173",
               "name": "433配置用",
               "parentid": 73,
               "category": "Great",
               "symbolSize": 50,
               "symbol": "path://M480 64C250.24 64 64 250.24 64 480 64 709.76 
250.24 896 480 896c229.76 0 416-186.24 416-416C896 250.24 709.76 64 480 64zM480 
832C285.44 832 128 674.56 128 480 128 285.44 285.44 128 480 128 674.56 128 832 
285.44 832 480 832 674.56 674.56 832 480 832z",
               "itemStyle": {
                   "borderColor": "#000",
                   "borderWidth": 5
               }
           }, {
   
               "id": "sensor_173130",
               "name": "超级传感器",
               "parentid": "1_173",
               "category": "None",
               "symbolSize": 50,
               "symbol": "path://M480 64C250.24 64 64 250.24 64 480 64 709.76 
250.24 896 480 896c229.76 0 416-186.24 416-416C896 250.24 709.76 64 480 64zM480 
832C285.44 832 128 674.56 128 480 128 285.44 285.44 128 480 128 674.56 128 832 
285.44 832 480 832 674.56 674.56 832 480 832z",
               "itemStyle": {
                   "borderColor": "#000",
                   "borderWidth": 5
               }
           }, {
   
               "name": "外部设备数据测试",
               "id": "1_174",
               "parentid": 73,
               "category": "Great",
               "symbolSize": 50,
               "symbol": "path://M480 64C250.24 64 64 250.24 64 480 64 709.76 
250.24 896 480 896c229.76 0 416-186.24 416-416C896 250.24 709.76 64 480 64zM480 
832C285.44 832 128 674.56 128 480 128 285.44 285.44 128 480 128 674.56 128 832 
285.44 832 480 832 674.56 674.56 832 480 832z",
               "itemStyle": {
                   "borderColor": "#000",
                   "borderWidth": 5
               }
           }],
           "links": [{
               "source": 0,
               "target": 1
           }, {
               "source": 1,
               "target": 2
           }, {
               "source": 1,
               "target": 3
           }, {
               "source": 1,
               "target": 4
           }, {
               "source": 1,
               "target": 5
           }, {
               "source": 1,
               "target": 6
           }, {
               "source": 1,
               "target": 7
           }, {
               "source": 1,
               "target": 8
           }, {
               "source": 1,
               "target": 9
           }, {
               "source": 1,
               "target": 10
           }, {
               "source": 1,
               "target": 11
           }, {
               "source": 1,
               "target": 12
           }, {
               "source": 1,
               "target": 13
           }, {
               "source": 1,
               "target": 14
           }, {
               "source": 1,
               "target": 15
           }, {
               "source": 1,
               "target": 16
           }, {
               "source": 0,
               "target": 17
           }, {
               "source": 17,
               "target": 18
           }, {
               "source": 0,
               "target": 19
           }],
           "color": ["#00a65a", "#f39c12", "#dd4b39", "#a3a3a3"],
           "categories": [{
               "name": "Great"
           }, {
               "name": "Good"
           }, {
               "name": "Bad"
           }, {
               "name": "None"
           }],
           "itemStyle": {
               "normal": {
                   "label": {
                       "rotate": true,
                       "show": true,
                       "textStyle": {
                           "color": "#333",
                           "fontWeight": "bold"
                       }
                   }
               },
               "emphasis": {
                   "label": {
                       "show": true
                   }
               }
           },
           "lineStyle": {
               "normal": {
                   "color": "target",
                   "curveness": 0.3
               }
           }
       }]
   }
   
   ```
   
   
   
   
   ### Other comments [其他信息]
   <!-- For example: Screenshot or Online demo -->
   <!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] -->
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@echarts.apache.org
For additional commands, e-mail: dev-h...@echarts.apache.org

Reply via email to