Skip to main content
1-Visitor
October 12, 2016
Question

May I display the units for a value into the mashup?

  • October 12, 2016
  • 4 replies
  • 2967 views

If I have my property number which unit is in % is it possible to show into the label widget (or into any other widget) both the value and the unit?
So instead of 50, I want to see 50%.

Obviously without resort to another property which is the join of me.property+'%'

4 replies

22-Sapphire I
October 12, 2016

Usually I just use a Value Display widget and a label widget.

fmanniti1-VisitorAuthor
1-Visitor
October 13, 2016

Yes, it's also what I was doing but in this case I'm forced to have a fixed distance between number and unit so if I have 100 the result will be

100%

if I have 5 it will be

5  %

It's not a big deal, I just hoped there was another way.

1-Visitor
October 13, 2016

Hi Fabio, on the ValueDisplay widget you can align the number to the right ( Alignment=Right )

1-Visitor
March 7, 2018

Hi the way I have done this is by using an expression.

 

Add your param and then add a string type for units when you configure.

Set the output to the label

Change the expression Param+Units

Change the String for the Units in the properties box