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/04/21 07:04:16 UTC

[GitHub] [echarts] wh2017 opened a new issue, #16925: [Bug] Radar area is not correct

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

   ### Version
   
   5.3.2
   
   ### Link to Minimal Reproduction
   
   _No response_
   
   ### Steps to Reproduce
   
   open the demo link:https://echarts.apache.org/examples/zh/editor.html?c=radar
   
   replace the options
   
   option = {
     title: {
       text: 'Basic Radar Chart'
     },
     legend: {
       data: ['Actual Spending']
     },
     radar: {
       indicator: [
         { name: '内分泌与代谢疾病' },
         { name: '免疫系统' },
         { name: '感染' },
         { name: '血液及淋巴系统' },
         { name: '肿瘤'},
         { name: '神经系统' }
       ],
       radius: '50%'
     },
     series: [
       {
         name: 'Budget vs spending',
         type: 'radar',
         areaStyle: {
           
         },
         data: [
           {
             value: [0,2,0,3,2,0],
           }
         ]
       }
     ]
   };
   
   ### Current Behavior
   
   ![image](https://user-images.githubusercontent.com/25954808/164393837-599d4513-a9bb-48fb-970e-dab37a134806.png)
   
   
   ### Expected Behavior
   
   ![image](https://user-images.githubusercontent.com/25954808/164393906-cbe3ac40-8b51-4b78-9df7-5119dfe42cf7.png)
   
   
   ### 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] jiawulin001 commented on issue #16925: [Bug] Radar area is not correct

Posted by GitBox <gi...@apache.org>.
jiawulin001 commented on issue #16925:
URL: https://github.com/apache/echarts/issues/16925#issuecomment-1108001191

   This is rather a Zrender issue than an Echarts issue. Zrender would have such issue when drawing a polygon with two edges overlapping.


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


[GitHub] [echarts] echarts-bot[bot] commented on issue #16925: [Bug] Radar area is not correct

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

   @wh2017 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>
   
   **BODY**
   
   ### Version
   
   5.3.2
   
   ### Link to Minimal Reproduction
   
   _No response_
   
   ### Steps to Reproduce
   
   open the demo link: https://echarts.apache.org/examples/en/editor.html?c=radar
   
   replace the options
   
   option = {
     title: {
       text: 'Basic Radar Chart'
     },
     legend: {
       data: ['Actual Spending']
     },
     radar: {
       indicator: [
         { name: 'Endocrine and Metabolic Diseases' },
         { name: 'immune system' },
         { name: 'infection' },
         { name: 'Blood and Lymphatic System' },
         { name: 'tumor'},
         { name: 'nervous system' }
       ],
       radius: '50%'
     },
     series: [
       {
         name: 'Budget vs spending',
         type: 'radar',
         areaStyle: {
           
         },
         data: [
           {
             value: [0,2,0,3,2,0],
           }
         ]
       }
     ]
   };
   
   ### Current Behavior
   
   ![image](https://user-images.githubusercontent.com/25954808/164393837-599d4513-a9bb-48fb-970e-dab37a134806.png)
   
   
   ### Expected Behavior
   
   ![image](https://user-images.githubusercontent.com/25954808/164393906-cbe3ac40-8b51-4b78-9df7-5119dfe42cf7.png)
   
   
   ### 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


Re: [I] [Bug] Radar area is not correct [echarts]

Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #16925:
URL: https://github.com/apache/echarts/issues/16925#issuecomment-1753601175

   Workaround -  usually when zero values create problems, we replace them with "near zero" values.
   Also note _radar.indicator_ max values.
   [Demo Code](https://echarts.apache.org/examples/en/editor.html?c=radar&code=HYLwvABADAdF_wIwG4CwAoA9gBwC4EtNgJIBvDCCAJwEMATGqgLgnPUsv2DvwGMbcmZhADaFDpVIRgNALYBTFgHJAoYqAwJUAzNoDg5QMdygIhjAfa6BR1yUAaCLJoAPJgGYIAX1PiJUmQuWBZRUDVroG-fQPt-ZhbWdo7O7BKs0nKKEEqA-IaAy-ZBljb2Ti4cbjHKgAIRgE22gFPKgNO2gC-6ASkh6eGRUe6xSoD9AYAkbpVpGRGu0R5xgHqegPN-FeapoQ6ZALo1HLQ8AK4AzsoArFAApEriHZTz8lT48ouimWy19coAQrN0AObyuBAAbvMQ89jy3FzXZpmUuACeb2UM0Y306HEY8hoAGV_gAbWInWoQXiYWFCJhKKjyOgbMGULaRBi4GgsMR4rI_SIAeipDxosNmsREUFMACZTCzbGyOZNKRI6QymaBucKuezQLzyfjKeNMmMIrL0A5kEA)
   ![image](https://github.com/apache/echarts/assets/13038071/004a1b19-9967-41b1-8f6c-5e7ec686ed42)
   
   


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


[GitHub] [echarts] Ovilia commented on issue #16925: [Bug] Radar area is not correct

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #16925:
URL: https://github.com/apache/echarts/issues/16925#issuecomment-1120167905

   It seems to be a bug of Chrome. Tested with Safari and it works fine. It doesn't seem to be wrong with ZRender's source code.


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


Re: [I] [Bug] Radar area is not correct [echarts]

Posted by "nieyuyao (via GitHub)" <gi...@apache.org>.
nieyuyao commented on issue #16925:
URL: https://github.com/apache/echarts/issues/16925#issuecomment-1825228938

   I debugged the code to got the points that are drawn to the canvas.
   
   ```javascript
   const canvas = document.getElementById('canvas')
   const ctx = canvas.getContext('2d')
   const points = [
       [300, 300],
       [196.0769515458674, 239.99999999999994],
       [300, 300],
       [299.99999999999994, 390],
       [403.92304845413264, 360.0000],
       [300, 300],
       [300, 300],
   ]
   
   ctx.beginPath()
   ctx.moveTo(points[0][0], points[0][1])
   ctx.lineTo(points[1][0], points[1][1])
   ctx.lineTo(points[2][0], points[2][1])
   ctx.lineTo(points[3][0], points[3][1])
   ctx.lineTo(points[4][0], points[4][1])
   ctx.lineTo(points[5][0], points[5][1])
   ctx.lineTo(points[6][0], points[6][1])
   ctx.closePath()
   
   ctx.fillStyle = 'red'
   
   ctx.fill()
   ```
   **In Chrome**
   
   <img width="200" alt="image" src="https://github.com/apache/echarts/assets/17698194/c64d8080-b7d2-4c6b-afae-29f432558b82">
   
   **In FireFox**
   
   <img width="200" alt="image" src="https://github.com/apache/echarts/assets/17698194/f403b221-e9d3-42a3-a4e9-6f7896ba6b0e">
   
   **In Safari**
   <img width="220" alt="image" src="https://github.com/apache/echarts/assets/17698194/764f7e4f-6cb3-4a9c-9d12-10a4d361440f">
   
   It does seem to be a Chrome bug?
   
   


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


Re: [I] [Bug] Radar area is not correct [echarts]

Posted by "Ovilia (via GitHub)" <gi...@apache.org>.
Ovilia commented on issue #16925:
URL: https://github.com/apache/echarts/issues/16925#issuecomment-1813933408

   I'm not sure. I've dived into the code and didn't see anything wrong. Have to clue to fix this.


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


Re: [I] [Bug] Radar area is not correct [echarts]

Posted by "MimiZhang11 (via GitHub)" <gi...@apache.org>.
MimiZhang11 commented on issue #16925:
URL: https://github.com/apache/echarts/issues/16925#issuecomment-1803259060

   > It seems to be a bug of Chrome. Tested with Safari and it works fine. It doesn't seem to be wrong with ZRender's source code.
   
   I don't think that's the reason, I also tried to find this error in Edge browser.


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