Hi guys, Does anyone know if it is possible to rem...
# gooddata-platform
g
Hi guys, Does anyone know if it is possible to remove the decimal number in this case? I see in the documentation that it is possible to change only in "," and "." documentation: https://sdk.gooddata.com/gooddata-ui/docs/chart_config.html#change-a-separator-in-the-number-format
j
Hello @Gabriel Santos! Please try applying formatting to your metric; you can do this directly to the metric definition, or ad-hoc in the Analyze config.
Where is this chart coming from? Has it been built in the Analyze tab, or has it been built in the JavaScript using GoodData.UI SDK?
g
This chart was created using the GoodData.UI SDK
j
I see. In that case you will want to use the
modifyMeasure()
helper from the
@gooddata/sdk-model
package.
It could look something like this:
const NrRestaurants = modifyMeasure(Md.NrRestaurants, (m) => m.format("#,##0"));
Or a bit more advanced like this:
Copy code
const TotalSales = modifyMeasure(Md.$TotalSales, (m) =>
    m.format("#,##0").alias("$ Total Sales").title("Total Sales"),
);
I'd recommend just browsing through https://gdui-examples.herokuapp.com/ as there are many examples on different topics 😉 Let me know if it helps!
g
Ok, thanks