Using the Chart Config Editor to customise tooltips for pie charts

I am using the Chart Config Editor to customise tooltips for a pie chart. Currently, my tooltip includes the following information:

  • a circle, which is rendered the same colour as the segment colour
  • the value of the segment (e.g. 267,023)
  • the percentage share of the segment (e.g. 32%)

 

 

tooltip: {
format: '<span style="color:{color}">\u25CF</span> {key}<br/>{y:,.0f} ({percentage:,.0f}%)',
},

 

I also want to include the name of the measure (e.g. 'Items Sold'). I don't want to hard-code this by just typing 'items sold' into the format property. For cartesian charts, I would just include the variable {series.name}. However, for pie charts, this variable generates the text 'Series 1' for every segment. How do I reference the series name for pie charts?

(In case this is helpful to anyone else, here are the variables that I have documented so far:)

 
 
variables.png
Solved Solved
1 4 756
1 ACCEPTED SOLUTION

Good testing!

I did some more research with the team, and we can confirm that this is a limitation with the Chart Config Editors in the pie chart. We'd like to address this in a future update - thanks for bringing it up!

View solution in original post

4 REPLIES 4
Top Labels in this Space
Top Solution Authors