• 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

    State chart to show only true values

    Dashboard Designer & Custom AngularJS Pages
    2
    3
    2.3k
    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.
    • K
      KKS
      last edited by

      Hi,

      I am filtering designer.points from watch list to get the displayed points in the state chart

      To get compressor 1 point this is what I have
      <ma-calc output="comp1Output" input="designer.points | filter:{name:deviceName + 'comp_1_on'} | maFirst"></ma-calc>

      <ma-point-values point="comp1Output" values="comp1OutputValues" from="dateBar.from" to="dateBar.to" rollup="{{dateBar.rollupType}}" rollup-interval="{{dateBar.rollupIntervals}} {{dateBar.rollupIntervalPeriod}}"></ma-point-values>

      I then use comp1OutputValues in state chart to display compressor 1

      1. To display true values only, I tried to filter on comp1Output output object from ma-calc above

      <ma-calc output="comp1truevalues" input="comp1Output | filter:{comp1Output.values == 1"} | maFirst"></ma-calc>

      it errors out.

      1. How to not display true/false labels in the segments.

      Please let me know how to achieve this?0_1573176645143_statechart.png

      Thanks!

      1 Reply Last reply Reply Quote 0
      • CraigWebC
        CraigWeb
        last edited by

        Hi KKS

        Add this to your code somewhere <pre ng-bind="point1Values | json"></pre> temporarily so you can see the structure of the data object
        You have used .values on your filter function not .value

        1 Reply Last reply Reply Quote 0
        • K
          KKS
          last edited by

          Thanks CraigWeb for your response.

          Here is what I tried.

          FIRST ATTEMPT
          <pre ng-bind="comp1OutputValues | json"></pre>

          <ma-calc output="falseOutput" input=" comp1Output | filter:{comp1Output.value == 0} | maFirst"></ma-calc>
          <ma-calc output="trueOutput" input="comp1Output | filter:{comp1Output.value == 1} | maFirst"></ma-calc>
          <pre ng-bind="falseOutput | json" ></pre>
          <pre ng-bind="trueOutput | json"></pre>

          Error shown in attached image

          SECOND ATTEMPT

          <pre ng-bind="comp1OutputValues | json"></pre>
          <ma-calc output="falseOutput" input=" comp1OutputValues | filter:{comp1OutputValues == 0} | maFirst"></ma-calc>
          <ma-calc output="trueOutput" input="comp1OutputValues | filter:{comp1OutputValues == 1} | maFirst"></ma-calc>
          <pre ng-bind="falseOutput | json" ></pre>
          <pre ng-bind="trueOutput | json"></pre> 0_1573229347456_statechart2.png

          Error shown in attached image

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