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/03/23 06:38:21 UTC

[GitHub] [echarts] zhanghaoStart edited a comment on issue #14502: treemap 设置 rich 后整体label不水平垂直居中

zhanghaoStart edited a comment on issue #14502:
URL: https://github.com/apache/echarts/issues/14502#issuecomment-804657977


   @89466598946659 
   It is a option problem.
   Try the following configuration.
   {
           series: [{
                   type: 'treemap',
                   name: '中国',
                   leafDepth: 1,
                   label: {
                       position: ['50%', '50%'], // I think it will help you
                       formatter: '{b}',
                       rich:{}, 
                   },
                   data: [{
                       name: '河北省',            // First tree
                       value: 10,
                       children: [{
                           name: '邯郸市',       // First leaf of first tree
                           value: 4
                       }, {
                           name: '保定市',       // Second leaf of first tree
                           value: 6
                       }],
                   }, {
                       name: '河南省',            // Second tree
                       value: 20,
                       children: [{
                           name: '郑州市',       // Son of first tree
                           value: 20,
                           children: [{
                               name: 'xxx县',  // Granson of first tree
                               value: 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.

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