Mongodb Charts - Empty and Decimal


I have two issues with mongodb charts.

  1. Bar or Column charts, Aggregation axis is displaying values as decimal values. There is no issue with data retrieval. It is getting the correct value, but the value display isn’t right. Number of people can’t be displayed in decimal values. How to fix this? I tried everything in customize options. Nothing worked.

  2. When there is no data in the collection, chart is being displayed as empty. Instead of empty chart, I would like to post a message as " no data to display" or something message in it. So, that user doesn’t have to get confused where is there a blank chart. Can I do this from charts side?

Any help is greatly appreciated.

Hello @sunita_kodali ,

I noticed that you have not had a response to this topic yet, were you able to find a solution?
If not, then I would suggest you to try solutions mentioned below

Go to Customize option and in field portion select your axis. Under that you will find Number formatting where you can toggle off the Decimals field.

You can do this with custom code at your client’s end. You can programmatically retrieve the chart data. If it is empty you can hide the chart and show the text message. Currently, there is no such feature present from charts side, but you can always open an idea at MongoDB Feedback Engine.


Will try. Thank you, Tarun.

1 Like