Reduce decimals in Looker Pie Chart

It seems impossible to reduce the number of decimals displayed in the pie chart visualisation in Looker. It is by default 2 which is often too much and it would be useful to be easily able to change that, however even with the help of Gemini I cannot come up with a way to change it.

I tried to edit the YAML of the chart config but it went only from 25.16% → 0.3 → 0.3%.

This is a simple operation built in in Data studio and should be implemented in Looker asap.

It’s really annoying, isn’t it? The only way to do this is to override the default chart settings using the Chart Config Editor:

  legend: {
    labelFormat: '<b>{name}</b> - {percentage:.0f}%'
  },

I also like to customise tooltips and ensure these are formatted to zero decimal places too:

  tooltip: {
    format: '<span style="color:{color}; font-size: 1.2em;">\u25CF </span> <span style="font-size: 1.2em;">{key}</span><br/>{y:,.0f} ({percentage:,.0f}% of total)',
  },```

Indeed, very annoying! Even more so that unfortunately my pie chart resists your solution! It just won’t do the job, I don’t understand why :frowning:

But thanks anyway