simplg commented on issue #17358:
URL: https://github.com/apache/echarts/issues/17358#issuecomment-1610991569

   I have also encountered the same problem with the library. In our area of 
field, we are using the sunburst to plot z scores for subdomains and domains. 
The domain's value is the mean of the z score of the subdomain which are its 
children. Therefore, the domain's value is always less then the sum of value of 
its subdomains.
   We can't really hack around it with the formatter label (by modifying the 
displayed label with a different value), since we are using visualmaps to plot 
colors.
   I would propose that an option should be available to disable the link 
between value and radius of a sunburst element. By doing this, we could put 
whatever value we want for parents and children and not have any problem with 
rendering while still having the possibility to have the correct color shown 
through visualmap.
   
   Basically it would be great to have this rendering: 
   
![sunburst-visualMap](https://github.com/apache/echarts/assets/81249731/d5fde96f-0285-4192-a756-0321fabc76e4)
   With this kind of code: 
   [Codepen](https://codepen.io/akuma06/pen/oNQZBqX)
   ```js
   var data = [
     {
       name: 'Grandpa',
       children: [
         {
           name: 'Uncle Leo',
           value: 15,
           children: [
             {
               name: 'Cousin Jack',
               value: 2
             },
             {
               name: 'Cousin Mary',
               value: 5,
               children: [
                 {
                   name: 'Jackson',
                   value: 2
                 }
               ]
             },
             {
               name: 'Cousin Ben',
               value: 4
             }
           ]
         },
         {
           name: 'Aunt Jane',
           children: [
             {
               name: 'Cousin Kate',
               value: 4
             }
           ]
         },
         {
           name: 'Father',
           value: 10,
           children: [
             {
               name: 'Me',
               value: 5,
               itemStyle: {
                 color: 'red'
               }
             },
             {
               name: 'Brother Peter',
               value: 1
             }
           ]
         }
       ]
     },
     {
       name: 'Mike',
       children: [
         {
           name: 'Uncle Dan',
           children: [
             {
               name: 'Cousin Lucy',
               value: 3
             },
             {
               name: 'Cousin Luck',
               value: 4,
               children: [
                 {
                   name: 'Nephew',
                   value: 2
                 }
               ]
             }
           ]
         }
       ]
     },
     {
       name: 'Nancy',
       children: [
         {
           name: 'Uncle Nike',
           children: [
             {
               name: 'Cousin Betty',
               value: 1
             },
             {
               name: 'Cousin Jenny',
               value: 2
             }
           ]
         }
       ]
     }
   ];
   option = {
     visualMap: {
       type: 'continuous',
       min: 0,
       max: 10,
       inRange: {
         color: ['#2F93C8', '#AEC48F', '#FFDB5C', '#F98862']
       }
     },
     series: {
       type: 'sunburst',
   
       // New property suggested
       disableRadiusFromValue: true,
   
       data: data,
       radius: [0, '90%'],
       label: {
         rotate: 'radial'
       }
     }
   };
   ```


-- 
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-unsubscr...@echarts.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org
For additional commands, e-mail: commits-h...@echarts.apache.org

Reply via email to