1 Reply Latest reply on Jul 17, 2017 8:36 PM by athompson RSS
    agangaiah Explorer

    Want to see 3D Gauge name as well as its value

    Hi,

     

    I have placed a 3D Gauge in the canvas against a 3D model and also I have a tagged the 3D Gauge to an RPM value steamed from Thingworx Core.

     

    When I do a preview or see the experience in my tab, I can see the gauge showing RPM values successfully, but I wanted to know how can I enable to show the gauge name as well.

     

    In the end I want it show up as RPM : 245 or something like that. So that it show both the value as well as the Gauge name. I remember seeing a tutorial on this once but not able to locate.

     

    Any ideas.

     

    Thanks,

    Avinash

      • Re: Want to see 3D Gauge name as well as its value
        athompson Apprentice

        Hi Avinash,

         

        You can do this by applying a filter to the binding.  Select the gauge and in the binding section at the bottom of the screen, click the Add Filter button.

         

        Give the filter a name and then define the filter body to add the text that you want to the value that is being displayed.  In my example below, I wanted to create a filter for a temperature gauge so it showed the value with °C after and it looks like this:

         

        return $filter('number')(value, 0) + " °C";

         

        Clipboard01.png

        The (value,0) is controlling the number of decimal places, so if you wanted 1 decimal place it would be (value,1)

         

        So when I look at the gauge, it looks like this:

        Clipboard02.png

         

        Hope this helps.

         

        Allan