Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

How do I change the font size for Simple Point?


  • Hi,

    I have just created some simple point to collect some temperature reading . However, i need to enlarge the font size of the reading. Can anyone advise how can it be done?
    :)
    Thanks

    Chin


  • You can use a server-side script instead, and then do something like this:

    return '<span style="font-size:20px;">'+ value +'</span>';
    

  • @mlohbihler said:

    You can use a server-side script instead, and then do something like this:

    return '<span style="font-size:20px;">'+ value +'</span>';
    

    Got it, Thank you very much :D


  • How do you include the format and the suffex?


  • Each point in the watch list has a "brick" icon at right-hand side. By clicking this icon you'll see the point properties and you'll be able to change its precision format and suffix.


  • Thank you, but I don't think that answers the question when trying to display data using a script. What is the script field name for 'suffix'?


  • Sure, but if you are using a script you just need to add the plain text.

    return '<span style="font-size:20px;">'+ value +'°C</span>';
    

  • Is there a way to use the UOM entered for the Suffix value? That way when the UOM changes in the Data Point Attribute it automaticly changes in the graphic display. After all, the Simple Point will display the Name and the Suffix.

    Thanks!


  • In addition to "value", you can also try "htmlText" and "renderedText".


  • To answer your question, "htmlText" is the rendered text with colour (if appropriate), and optionally wrappers around very long values.


  • Or, to quote the online documentation:

    A Server-side script component can be used to define your own rendering logic. The scripting language used here is JavaScript, also known as ECMAScript. (The full specification for ECMAScript is available here.) There are, however, no "window" or "document" objects available since the script is evaluated on the server rather than the browser. Instead, the current value of the point is available via the value var, and the timestamp of the sample is given in the time var. In addition, pointComponent and point vars are also defined, with analogous values, and "htmlText" and "renderedText" represent rendered versions of the value. Finally, "events" provides a list of active events for the point, and "hasUnacknowledgedEvent" is a boolean value indicating whether at least one of the active events is not acknowledged.


  • Thanks for the information. How do you grab the Name?

    What I really want is a Simple Point without the Orange border with a White background. How do you remove the Orange border?


  • Try "return point.name;". I believe the documentation should help with the rest.