You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2018/08/07 08:33:25 UTC

[GitHub] erezcarmel opened a new issue #8831: Pie circle is painted wrong when data namer is "1"

erezcarmel opened a new issue #8831: Pie circle is painted wrong when data namer is "1"
URL: https://github.com/apache/incubator-echarts/issues/8831
 
 
   ### One-line summary
   When the pie name is defined as "1" the whole circle is being painted. Only when adding spaces to the name (" 1 "), the circle is painted correctly.
   
   ### Version & Environment
   + ECharts version: Latest
   + Browser version: Chrome
   + OS Version: OSX
   
   
   ### Expected behaviour
   The pie circle should show only the relevant part of the circle (1/20) and not the whole circle.
   
   ### ECharts option
   Not working right:
   ```javascript
   option = {
       "tooltip": {
           "trigger": "item"
       },
       "graphic": {
           "elements": [{
               "type": "circle",
               "shape": {
                   "cx": 0,
                   "cy": 0,
                   "r": 40
               },
               "left": "center",
               "top": "center",
               "style": {
                   "fill": "#fff"
               }
           }]
       },
       "series": [{
           "color": ["#EC6363", "transparent"],
           "type": "pie",
           "stillShowZeroSum": true,
           "radius": [45, 39],
           "avoidLabelOverlap": true,
           "hoverAnimation": false,
           "label": {
               "show": true,
               "position": "center",
               "fontSize": 24,
               "color": "#0F1C24"
           },
           "data": [{
               "value": 1,
               "name": "1"
           }, {
               "value": 20,
               "label": {
                   "show": false,
                   "position": "inside"
               }
           }],
           "startAngle": 360
       }]
   };
   ```
   
   Works ok (notice the change in the first data name change):
   ```javascript
   option = {
       "tooltip": {
           "trigger": "item"
       },
       "graphic": {
           "elements": [{
               "type": "circle",
               "shape": {
                   "cx": 0,
                   "cy": 0,
                   "r": 40
               },
               "left": "center",
               "top": "center",
               "style": {
                   "fill": "#fff"
               }
           }]
       },
       "series": [{
           "color": ["#EC6363", "transparent"],
           "type": "pie",
           "stillShowZeroSum": true,
           "radius": [45, 39],
           "avoidLabelOverlap": true,
           "hoverAnimation": false,
           "label": {
               "show": true,
               "position": "center",
               "fontSize": 24,
               "color": "#0F1C24"
           },
           "data": [{
               "value": 1,
               "name": " 1 "
           }, {
               "value": 20,
               "label": {
                   "show": false,
                   "position": "inside"
               }
           }],
           "startAngle": 360
       }]
   };
   ```
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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