Display Decimal numbers

Stimulsoft Dashboards.WIN discussion
Post Reply
mahdibg
Posts: 5
Joined: Sun Apr 05, 2020 8:43 am

Display Decimal numbers

Post by mahdibg »

Hello
In the number display settings, we can specify the "Decimal Digits", this value is fixed for numbers.
Is there a way to dynamically display digits after the . ? For example
12 display => 12
12.1 display => 12.1
12.25 display => 12.25
12.251 display => 12.25


thanks
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Display Decimal numbers

Post by Lech Kulikowski »

Hello,

You can use the following expression:
{Format("{" + Format("0:F{0}", digits) + "}", 123.456789)}

Thank you.
Post Reply