Significant Figures

Does anyone know how to limit the amount of sig figs that appear on any sort of Display widget? Labels, specifically?

Yes. In any label component that displays a numeric value, you can change the number format pattern in the property editor list. Expand the list to “All” and you should see a property called “Number Format Pattern”. The number of # symbols after the decimal will represent the number of sig figs you will have.

You can also use the numberFormat function if using an expression binding on the label. I do this a lot to display numbers in a string, example:

"The temperature is: " + numberFormat({path/to/tag}, "##0.0") + " °F"

Hmm. That’s interesting, because I’m using a label called Circle_value, Circle1_value, etc. And when I check under the Property Editor when it’s set to All, there’s no property called “Format Number Pattern.” I know that this type of label can work with numbers, as this is what I’m having it do. Any reason why some of the properties would not show up under the property editor?

Is it a Label or a Numeric Label? I don’t think regular Label components have a number format pattern value, you have to do it with the expression function.

Oh I think it’s just a normal Label. But if I am doing a SQL query for the now-numeric label, can I do it with an expression function at the same time?

You can if you create a custom property on the label and bind your SQL query to that. Then you can use the expression binding to reference the custom property that you just made and format it to the way you want it.