VolkovLabs / volkovlabs-dynamictext-panel

Business Text Panel for @grafana
https://docs.volkovlabs.io
Apache License 2.0
78 stars 14 forks source link

[ASK] How to change the number format to thousands separator #326

Closed itsnull12 closed 1 week ago

itsnull12 commented 1 week ago

Hi Volkov Labs Team,

Can you help me change the number format to thousands separator?

image

Here is my html code:

TOTAL DOSEN

{{total_dosen}}

TOTAL SKS

{{total_sks}}

TOTAL MATA KULIAH

{{total_matkul}}

TOTAL PRODI

{{total_prodi}}

I'm really confused how to convert numbers with thousands separator with JavaScript code in Dynamic Text Panel.

Thank you!

vitPinchuk commented 1 week ago

@itsnull12 Thank you for your question

Please try to use unit options. Set the option to Unit -> Locale Format, and it adds a space separator

image

example panels without separator and with a separator image

itsnull12 commented 1 week ago

@vitPinchuk omg I forgot that this feature exists in Grafana. I really appreciate it! Thank you very much.