I am using metabase v0.33.6. Please advise how to set the format of percentage of the pie chart.
Can you double-check that you’re using 0.33.6? Since I remember seeing this problem on earlier versions of 0.33.x
You should be able to set percentage in visualization Settings > Display.
Are you using Custom or Native question? What is the column type of the numbers?
I am using the latest version v0.33.6. We are using Custom question and the column type is sum of integer. Thanks.
I cannot reproduce the problem.
Can you post Diagnostic Info? Admin > Troubleshooting
And what is the Field Type you are sum’ing? Admin > Data Model > (database) > (table) > (column)
“userAgent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763”,
“java.runtime.name”: “Java™ SE Runtime Environment”,
“java.vendor”: “Oracle Corporation”,
“java.vm.name”: “Java HotSpot™ 64-Bit Server VM”,
“os.name”: “Windows 10”,
Also, what’s your settings in visualization Settings > Data > (sum column) ?
You set percentage under visualization Settings > Display - not Data, as I wrote before.
EDIT: Be careful about using H2 as application database in production - you should migrate away:
I have found the root cause of the problem and solved it. The Field Type is set to Category and I change to number. It works. Thanks.
We need to change the Field Type manually and it is auto-mapped by metabase?
Metabase tries to map Field Type automatically, when your database is scanned the first time.
It’s not always that’s correct, so you should check the Data Model for any wrongly mapped fields, and adjust display type and formatting too, if needed.
I have the exact same problem with a native SQL query based pie chart. What is needed is a setting next to “Show percentages in legend” switch to control the number of decimal places to show. Unfortunately, there is none.
@amsam Which version of Metabase? You can control the formatting in visualization Settings > Data > (sum column)
Maybe this screenshot helps to clarify the problem?
Version is 0.33.4. The only potentially relevant improvement I saw in the change log of later versions was in 33.6 (#10837). But this appears to only be related to justification and not the decimal issue.
@amsam This is a different thing than the original topic.
Currently Metabase does the percentage decimals automatically. It would be helpful if you create an example that works with Sample Dataset or static SQL.
But you should open a feature request:
This can be reproduced with any pie chart basically. In it’s simplest form, this native query on sample data will produce 5 records which can be turned into a pie chart:
select top(5) PRODUCT_ID, sum(TOTAL) from ORDERS group by PRODUCT_ID
The result will be:
Sure, will create a FR
Hi… Facing same situation. Is there any possibilities to changes the no.of decimal place? Version -v0.35.4
Would appreciate you help! Thanks in advance!
One more question. Is there possibility to change format (decimal place) for one particular value in a column
@Timple Not with formatting, since it’s column based, so you would have to do the formatting in SQL and return the value as string, so Metabase formatting isn’t applied.
It seems like I am facing the same problem. Is there now a way to limit the number of decimal places of pie chart legends ?
Many thanks !
I have the same problem in version 0.45