• Recent
    • Tags
    • Popular
    • Register
    • Login

    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 Mango 5 Documentation Website

    Latest point values

    Dashboard Designer & Custom AngularJS Pages
    3
    5
    1.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      leoboeng
      last edited by

      Hello, I'm creating a page and wanted to use the "Latest point values", follow the code below:

      <div layout="row">
          <md-input-container flex>
              <label>Choose a point</label>
              <ma-point-list limit="200" ng-model="point1"></ma-point-list>
          </md-input-container>
          <md-input-container flex="25">
              <label>Number of latest values</label>
              <input ng-init="latestX=10" type="number" step="1" min="1" max="50" ng-model="latestX" ng-model-options="{debounce:500}">
          </md-input-container>
          <md-switch ng-init="realtime=true" ng-model="realtime">
              Realtime
          </md-switch>
      </div>
      
      <div layout="row">
      
      </div>
      
      <ma-point-values point="point1" values="point1Values" latest="latestX" realtime="realtime" rendered="true">
      </ma-point-values>
      
      <md-table-container>
          <table md-table>
              <thead md-head>
              <tr>
                  <th md-column>Time</th>
                  <th md-column>Value</th>
              </tr>
              </thead>
              <tbody md-body>
              <tr ng-repeat="value in point1Values | orderBy:'-timestamp'">
                  <td md-cell>{{value.timestamp | maMoment:'format':'ll LTS'}}</td>
                  <td md-cell>{{value.value}}</td>
              </tr>
              </tbody>
          </table>
      </md-table-container>
      

      I would like to make the values it shows are the "renderedValue", I tried to add this type of value in the ready code but I did not succeed.

      Would anyone have any tips?

      1 Reply Last reply Reply Quote 0
      • MattFoxM
        MattFox
        last edited by MattFox

        In

        <md-table-container>
            <table md-table>
                <thead md-head>
                <tr>
                    <th md-column>Time</th>
                    <th md-column>Value</th>
                </tr>
                </thead>
                <tbody md-body>
                <tr ng-repeat="value in point1Values | orderBy:'-timestamp'">
                    <td md-cell>{{value.timestamp | maMoment:'format':'ll LTS'}}</td>
                    <td md-cell>{{value.value}}</td>
                </tr>
                </tbody>
            </table>
        </md-table-container>
        

        replace {{value.value}} with {{value.value}} {{point1.unit}}
        You may be able to use {{value.renderedValue}} instead but I cannot remember right now off the top of my head if <ma-point-values> does it...
        Two: Also note that for renderedValue to work, you need to have the units field set for the chosen datapoint.

        Do not follow where the path may lead; go instead where there is no path.
        And leave a trail - Muriel Strode

        1 Reply Last reply Reply Quote 0
        • phildunlapP
          phildunlap
          last edited by

          It'd be {{value.rendered}}

          1 Reply Last reply Reply Quote 0
          • MattFoxM
            MattFox
            last edited by

            Thanks Phil

            Do not follow where the path may lead; go instead where there is no path.
            And leave a trail - Muriel Strode

            1 Reply Last reply Reply Quote 0
            • L
              leoboeng
              last edited by

              It worked, thank you.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post