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/30 02:50:00 UTC

[GitHub] [echarts] pissang edited a comment on issue #7766: 矩形树图treemap的样式问题。

pissang edited a comment on issue #7766:
URL: https://github.com/apache/echarts/issues/7766#issuecomment-982229818


   We can use `labelLayout` to set font size based on the size of rect. For example:
   ```ts
   labelLayout: function (params) {
       if (params.rect.width < 5 || params.rect.height < 5) {
           return {
               fontSize: 0
           };
       }
       return {
           fontSize: Math.min(Math.sqrt(params.rect.width * params.rect.height) / 10, 20)
       };
   },
   ```


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