Pie chart labels


#1

Hi guys, I am using the pie chart in one of my dashboards and its field values print around the pie with lines pointing to the slices. I’d like to be able to have these values inside the pie instead as they are small enough. Is there a way I can do that?


#2

Hi @frank , you can use the labelPosition setting. Its default value is “outside” but you can also set it to “inside”. When rendering the labels inside the slices, the Pie visualization is smart enough to only render the labels that fit to avoid overlapping them. If a label text is too big, you can resize the Pie to give more space to render that label. You will also notice the labels change color automatically depending on the background color of the slice for good readability.


#3

Hi @arturo , I already tested the new feature inside the Pie chart and my dashboard looks awesome. I wonder if it is possible to show metric values instead of group values as labels. Can I do that?


#4

Hi @frank , you can use the metricValue setting. By default Pie renders group values for its labels but you can set metricValue to true, which guarantees your Pie chart will use the metric values instead of groups values to render its labels.