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.
State chart to show only true values
-
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
- 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.
- How to not display true/false labels in the segments.
Please let me know how to achieve this?
Thanks!
-
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
-
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>Error shown in attached image