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 2021/11/26 04:58:27 UTC

[GitHub] [echarts] pissang commented on issue #16117: Zero sum pie chart

pissang commented on issue #16117:
URL: https://github.com/apache/echarts/issues/16117#issuecomment-979697477


   I think you can just set a gray color if all value are zero. It's as easy as:
   
   ```ts
   const isAllZero = data.every(item => item.value === 0);
   data: data.map(item => {
     ...item,
     itemStyle: { color: isAllZero ? 'gray' : undefined }
   })
   ```
   
   


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