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/08/05 01:30:18 UTC

[GitHub] [echarts] pineappleok opened a new issue, #17475: [Bug] labelLayout:hideOverlap隐藏掉的label应该在emphasis时显示出来

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

   ### Version
   
   5.3.3
   
   ### Link to Minimal Reproduction
   
   _No response_
   
   ### Steps to Reproduce
   
   版本:5.3.3
   配置代码代码如下:
   `option = { "backgroundColor": "#000a40", "title": { "text": "title", "x": "center", "top": 15, "textStyle": { "color": "#fff" } }, "tooltip": { "trigger": "axis", "axisPointer": { "type": "shadow" } }, "emphasis": { "focus": "series", "label": { "show": true } }, "toolbox": { "feature": { "saveAsImage": { "backgroundColor": "#243a55" } }, "iconStyle": { "borderColor": "#fff", "fontSize": "22px" } }, "color": [ "#F56679", "#4C98FB", "#8CDF6C", "#9D50E0", "#1D50E0", "yellow", "purple", "white" ], "legend": { "bottom": 10, "left": "center", "itemWidth": 10, "itemHeight": 10, "padding": [ 5, 10 ], "textStyle": { "fontSize": 16, "color": "#96A4F4", "padding": [ 3, 0, 0, 0 ] }, "data": [ "公路", "水运", "民航", "铁路", "测试", "公路1", "水运1", "民航1", "铁路1", "测试1" ] }, "grid": { "left": "3%", "right": "4%", "bottom": "7%", "containLabel": true }, "xAxis": { "type": "category", "axisLabel": { "color": "#96A4F4", "rotate": 0 }, "axisLine": { "lineStyle": { "colo
 r": "#96A4F4" }, "width": 5 }, "axisTick": { "show": false }, "data": [ "2015", "2016", "2017", "2018" ] }, "yAxis": { "name": "单位:个", "type": "value", "axisLabel": { "color": "#96A4F4" }, "axisLine": { "lineStyle": { "color": "#96A4F4" }, "width": 5 }, "axisTick": { "show": false }, "splitLine": { "lineStyle": { "color": "rgba(150, 164, 244, 0.3)" } } }, "series": [ { "name": "公路", "type": "bar", "stack": "总数", "barWidth": "45%", "data": [ 1550, 1.26, 2125, 1800 ], "labelLayout": { "hideOverlap": true }, "label": { "show": true, "labelNameShow": true, "position": [ "-60%", "50%" ], "fontSize": 14, "color": "rgba(255, 255, 255, 1)" }, "labelLine": { "show": true } }, { "name": "水运", "type": "bar", "stack": "总数", "barWidth": "45%", "data": [ 929, 945, 1012, 9.3 ], "labelLayout": { "hideOverlap": true }, "label": { "show": true, "labelNameShow": true, "position": [ "-60%", "50%" ], "fontSize": 14, "color": "rgba(255, 255, 255, 1)" }, "labelLine": { "show": true
  } }, { "name": "民航", "type": "bar", "stack": "总数", "barWidth": "45%", "data": [ 2310, 2890, 3198, 3645 ], "labelLayout": { "hideOverlap": true }, "label": { "show": true, "labelNameShow": true, "position": [ "-60%", "50%" ], "fontSize": 14, "color": "rgba(255, 255, 255, 1)" }, "labelLine": { "show": true } }, { "name": "铁路", "type": "bar", "stack": "总数", "barWidth": "45%", "data": [ 1670, 2337, 2724, 2990 ], "labelLayout": { "hideOverlap": true }, "label": { "show": true, "labelNameShow": true, "position": [ "-60%", "50%" ], "fontSize": 14, "color": "rgba(255, 255, 255, 1)" }, "labelLine": { "show": true } }, { "name": "测试", "type": "bar", "stack": "总数", "barWidth": "45%", "data": [ 1550, 1.26, 2125, 1800 ], "labelLayout": { "hideOverlap": true }, "label": { "show": true, "labelNameShow": true, "position": [ "-60%", "50%" ], "fontSize": 14, "color": "rgba(255, 255, 255, 1)" }, "labelLine": { "show": true } }, { "name": "公路1", "type": "bar", "stack": "总
 数", "barWidth": "45%", "data": [ 929, 0.945, 1012, 9.3 ], "labelLayout": { "hideOverlap": true }, "label": { "show": true, "labelNameShow": true, "position": [ "-60%", "50%" ], "fontSize": 14, "color": "rgba(255, 255, 255, 1)" }, "labelLine": { "show": true } }, { "name": "水运1", "type": "bar", "stack": "总数", "barWidth": "45%", "data": [ 2310, 2890, 3198, 3645 ], "labelLayout": { "hideOverlap": true }, "label": { "show": true, "labelNameShow": true, "position": [ "-60%", "50%" ], "fontSize": 14, "color": "rgba(255, 255, 255, 1)" }, "labelLine": { "show": true } }, { "name": "民航1", "type": "bar", "stack": "总数", "barWidth": "45%", "data": [ 1670, 2337, 2724, 2990 ], "labelLayout": { "hideOverlap": true }, "label": { "show": true, "labelNameShow": true, "position": [ "-60%", "50%" ], "fontSize": 14, "color": "rgba(255, 255, 255, 1)" }, "labelLine": { "show": true } }, { "name": "铁路1", "type": "bar", "stack": "总数", "barWidth": "45%", "labelLayout": { "hideOverla
 p": true }, "label": { "show": true, "labelNameShow": true, "position": [ "-60%", "50%" ], "fontSize": 14, "color": "rgba(255, 255, 255, 1)" }, "labelLine": { "show": true } }, { "name": "测试1", "type": "bar", "stack": "总数", "barWidth": "45%", "labelLayout": { "hideOverlap": true }, "label": { "show": true, "labelNameShow": true, "position": [ "-60%", "50%" ], "fontSize": 14, "color": "rgba(255, 255, 255, 1)" }, "labelLine": { "show": true } } ] }`
   悬停截图效果如下:
   ![image](https://user-images.githubusercontent.com/11623842/182982334-b393029f-fb7f-4d30-8758-475bde6bac49.png)
   
   期望效果:希望被隐藏掉的label“0.945”,在鼠标悬停的时候(即emphasis时)能显示出来。
   
   ### Current Behavior
   
   ![image](https://user-images.githubusercontent.com/11623842/182982382-6181833b-596b-4277-92e1-ae4511818569.png)
   
   
   ### Expected Behavior
   
   希望被隐藏掉的label“0.945”,在鼠标悬停的时候(即emphasis时)能显示出来。
   
   ### Environment
   
   ```markdown
   - OS:
   - Browser:
   - Framework:
   ```
   
   
   ### 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 #17475: [Bug] labelLayout:hideOverlap隐藏掉的label应该在emphasis时显示出来

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

   @pineappleok 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] labelLayout: label hidden by hideOverlap should be displayed during emphasis
   
   **BODY**
   
   ### Version
   
   5.3.3
   
   ### Link to Minimal Reproduction
   
   _No response_
   
   ### Steps to Reproduce
   
   Version: 5.3.3
   The configuration code code is as follows:
   `option = { "backgroundColor": "#000a40", "title": { "text": "title", "x": "center", "top": 15, "textStyle": { "color": " #fff" } }, "tooltip": { "trigger": "axis", "axisPointer": { "type": "shadow" } }, "emphasis": { "focus": "series", "label" : { "show": true } }, "toolbox": { "feature": { "saveAsImage": { "backgroundColor": "#243a55" } }, "iconStyle": { "borderColor": "#fff", "fontSize": "22px" } }, "color": [ "#F56679", "#4C98FB", "#8CDF6C", "#9D50E0", "#1D50E0", "yellow", "purple", "white " ], "legend": { "bottom": 10, "left": "center", "itemWidth": 10, "itemHeight": 10, "padding": [ 5, 10 ], "textStyle": { " fontSize": 16, "color": "#96A4F4", "padding": [ 3, 0, 0, 0 ] }, "data": [ "road", "water transport", "civil aviation", "railway", "test", "road 1", "water transport 1", "civil aviation 1", "railway 1", "test 1" ] }, "grid": { "left": "3%", "right": " 4%", "bottom": "7%", "containLabel": true }, "xAxis": { "type": "category", "axisLabel": { "color": "#96A4F4", "rotate" : 
 0 }, "axisLine": { "lineStyle": { "color": "#96A4F4" }, "width": 5 }, "axisTick": { "show": false }, "data": [ "2015", "2016", "2017", "2018" ] }, "yAxis": { "name": "Unit: Units", "type": " value", "axisLabel": { "color": "#96A4F4" }, "axisLine": { "lineStyle": { "color": "#96A4F4" }, "width": 5 }, "axisTick": { "show": false }, "splitLine": { "lineStyle": { "color": "rgba(150, 164, 244, 0.3)" } } }, "series": [ { "name": "Highway" , "type": "bar", "stack": "total", "barWidth": "45%", "data": [ 1550, 1.26, 2125, 1800 ], "labelLayout": { "hideOverlap": true }, "label": { "show": true, "labelNameShow": true, "position": [ "-60%", "50%" ], "fontSize": 14, "color": "rgba(255 , 255, 255, 1)" }, "labelLine": { "show": true } }, { "name": "Water Transport", "type": "bar", "stack": "Total", "barWidth ": "45%", "data": [ 929, 945, 1012, 9.3 ], "labelLayout": { "hideOverlap": true }, "label": { "show": true, "labelNameShow": true, "position": [ "-60%", "50%" ], "fontSize": 14, "color": "rgba
 (255, 255, 255, 1)" }, "labelLine": { "show": true } }, { "name": "Civil Aviation", "type": "bar", "stack": "Total", "barWidth": "45%", " data": [ 2310, 2890, 3198, 3645 ], "labelLayout": { "hideOverlap": true }, "label": { "show": true, "labelNameShow": true, "position": [ "-60 %", "50%" ], "fontSize": 14, "color": "rgba(255, 255, 255, 1)" }, "labelLine": { "show": true } }, { "name" : "rail", "type": "bar", "stack": "total", "barWidth": "45%", "data": [ 1670, 2337, 2724, 2990 ], "labelLayout": { " hideOverlap": true }, "label": { "show": true, "labelNameShow": true, "position": [ "-60%", "50%" ], "fontSize": 14, "color": "rgba(255, 255, 255, 1)" }, "labelLine": { "show": true } }, { "name": "test", "type": "bar", "stack": "total ", "barWidth": "45%", "data": [ 1550, 1.26, 2125, 1800 ], "labelLayout": { "hideOverlap": true }, "label": { "show": true, "labelNameShow ": true, "position": [ "-60%", "50%" ], "fontSize": 14, "color": "rgba(255, 255, 255, 1)" }, "labelLine": { "show": tr
 ue } }, { "name": "Highway 1", "type": "bar", "stack": "Total", "barWidth": "45%", "data": [ 929, 0.945, 1012, 9.3 ], "labelLayout": { "hideOverlap": true }, "label" : { "show": true, "labelNameShow": true, "position": [ "-60%", "50%" ], "fontSize": 14, "color": "rgba(255, 255, 255, 1)" }, "labelLine": { "show": true } }, { "name": "Water Transport 1", "type": "bar", "stack": "Total", "barWidth": "45 %", "data": [ 2310, 2890, 3198, 3645 ], "labelLayout": { "hideOverlap": true }, "label": { "show": true, "labelNameShow": true, "position": [ "-60%", "50%" ], "fontSize": 14, "color": "rgba(255, 255, 255, 1)" }, "labelLine": { "show": true } }, { "name": "Civil Aviation 1", "type": "bar", "stack": "Total", "barWidth": "45%", "data": [ 1670, 2337, 2724, 2990 ], " labelLayout": { "hideOverlap": true }, "label": { "show": true, "labelNameShow": true, "position": [ "-60%", "50%" ], "fontSize": 14 , "color": "rgba(255, 255, 255, 1)" }, "labelLine": { "show": true } }, { "name": "Railway 1", 
 "type": "bar", "stack": "Total", "barWidth": "45%", "labelLayout": { "hideOverlap": true }, "label": { "show": true, "labelNameShow": true, "position": [ "-60%", "50%" ], "fontSize": 14, "color": "rgba(255, 255, 25 5, 1)" }, "labelLine": { "show": true } }, { "name": "Test 1", "type": "bar", "stack": "Total", "barWidth": "45%", "labelLayout": { "hideOverlap": true }, "label": { "show": true, "labelNameShow": true, "position": [ "-60%", "50%" ] , "fontSize": 14, "color": "rgba(255, 255, 255, 1)" }, "labelLine": { "show": true } } ] }`
   The hover screenshot effect is as follows:
   ![image](https://user-images.githubusercontent.com/11623842/182982334-b393029f-fb7f-4d30-8758-475bde6bac49.png)
   
   Expected effect: I hope that the hidden label "0.945" can be displayed when the mouse is hovered (ie, emphasis).
   
   ### Current Behavior
   
   ![image](https://user-images.githubusercontent.com/11623842/182982382-6181833b-596b-4277-92e1-ae4511818569.png)
   
   
   ### Expected Behavior
   
   It is hoped that the hidden label "0.945" can be displayed when the mouse is hovered (ie, emphasis).
   
   ### Environment
   
   ````markdown
   - OS:
   - Browser:
   - Framework:
   ````
   
   
   ### 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