Hide the labels in the pie graph in echart by baidu
Asked Answered
P

2

7

I am referring to this https://ecomfe.github.io/echarts/doc/example/pie1.html#-en example. I am not able to hide the adjacent labels in the pie graph. I have encircled one of the labels I wish to hide in the attached image. Kindly help. Thanks!

enter image description here

Parsee answered 20/7, 2016 at 4:31 Comment(1)
works if you include in the 'series' tag portion of the optionsMoffit
P
13

Found the solution to my problem. I had to include the following code into the options and it worked:

itemStyle : {
              normal : {
                         label : {
                                   show : false
                                  },
                         labelLine : {
                                       show : false
                                      }
                         }
              }
Parsee answered 20/7, 2016 at 7:7 Comment(0)
G
1

To dynamically hide the label and labelline, while passing the data to the pi-chart, you can use the following properties

{ value: 1, name: 'Open', label: { show: false }, labelLine: { show: false } },
{ value: 3, name: 'In Progress', label: { show: false }, labelLine: { show: false } },
{ value: 2, name: 'Done', label: { show: false }, labelLine: { show: false } }
Gainer answered 20/2 at 11:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.