<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[First initializing a chart using ma-point-values xid built using other datapoint values]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I've a chart where I want to show the power of an inverter, this is a template page named "home.html" I want to use it for several different inverter, so I calculate the datapoint xid using other two datapoints "plantNameAcronym" and "trackerRowColumn":</p>
<pre><code>&lt;div flex layout="column" layout-gt-sm="row" layout-align="space-between" ng-init="live=1; energy=0"&gt;
  &lt;md-card flex="100" flex-gt-sm="50"&gt;

    &lt;md-card-title&gt;
      &lt;md-button ng-class="{'selected': live === 1, 'not-selected':live!==0}" ng-mousedown="live=1; from=theTimeNow"&gt;LIVE&lt;/md-button&gt;
      &lt;mdp-date-picker mdp-placeholder="Day" ng-click="live=0" mdp-open-on-click="" mdp-format="ll" ng-model="from"&gt;&lt;/mdp-date-picker&gt;
    &lt;/md-card-title&gt;


    &lt;md-card-content class="graph-content"&gt;
      &lt;div ng-if="live ==0"&gt;
        &lt;ma-point-values point-xid="{{plantNameAcronym.value}}_TRK-{{trackerRowColumn.value}}_FML01-power-smart" point="powerPast" values="powerPastValues"
              from="from | moment:'startOf':'day' | moment:'add':3:'hours'"
              to="from | moment:'endOf':'day'" rollup="LAST" rollup-interval="1 minutes"&gt;
         &lt;/ma-point-values&gt;
      
      
         &lt;ma-serial-chart style="height: 250px; width: 98%" series-1-values="powerPastValues" series-1-color="#F88F24" series-1-point="powerPast" series-1-type="line"
            legend="false" default-balloon-text="Power: &lsqb;&lsqb;value&rsqb;&rsqb; kW" balloon="true" export="true"  stack-type="regular"
            options="{export: {'dateFormat': 'DD/MM/YYYY H:mm ', 'fileName': 'Power'},
            titles:[{text:'Power chart',color:'#165A87'}],
            valueAxes:[{title:'[kW]', gridColor:'#444343', axisColor:'#444343',titleColor:'#165A87'}],
            categoryAxis:{gridColor:'#444343', axisColor:'#444343', startEffect:'elastic'}
                }"&gt;
        &lt;/ma-serial-chart&gt;
      &lt;/div&gt;

      &lt;div ng-if="live ==1"&gt;
        &lt;ma-point-values point-xid="{{plantNameAcronym.value}}_TRK-{{trackerRowColumn.value}}_FML01-power-smart" point="powerLive" values="powerLiveValues"
          from="theTimeNow | moment:'startOf':'day' | moment:'add':3:'hours'"
          to="theTimeNow" rollup="LAST" rollup-interval="1 minutes"&gt;
        &lt;/ma-point-values&gt;

        &lt;ma-serial-chart style="height: 250px; width: 98%" series-1-values="powerLiveValues" series-1-color="#F88F24" series-1-point="powerLive" series-1-type="line"
          legend="false" default-balloon-text="Power: &lsqb;&lsqb;value&rsqb;&rsqb; kW" balloon="true" export="true"  stack-type="regular"
          options="{export: {'dateFormat': 'DD/MM/YYYY H:mm ', 'fileName': 'Power'},
          titles:[{text:'Power chart',color:'#165A87'}],
          valueAxes:[{title:'[kW]', gridColor:'#444343', axisColor:'#444343',titleColor:'#165A87'}],
          categoryAxis:{gridColor:'#444343', axisColor:'#444343', startEffect:'elastic'}
          }"&gt;
        &lt;/ma-serial-chart&gt;
      &lt;/div&gt;
    &lt;/md-card-content&gt;
  &lt;/md-card&gt;
      &lt;/div&gt;
</code></pre>
<p dir="auto">instead in another file customized for each inverter (6.4 in this case) I've something like this:</p>
<pre><code>&lt;ma-get-point-value point-xid="TER_TRK-6.4_ConfigRPI-tracker-rowColumn" point="trackerRowColumn"&gt;&lt;/ma-get-point-value&gt;
&lt;ma-get-point-value point-xid="TER_TRK-6.4_ConfigRPI-plantNameAcronym" point="plantNameAcronym"&gt;&lt;/ma-get-point-value&gt;
&lt;div ng-include="'templates/home.html'"&gt;&lt;/div&gt;
</code></pre>
<p dir="auto">My problem is that on first loading (live=1) the graph is not showed</p>
<p dir="auto"><img src="https://i.imgur.com/ZWIOdWS.png" alt="0_1580222892428_3cf14b86-3940-4d82-b7ae-d20b58a38adf-immagine.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">but clicking on "Day" an then again on "Live" the graph is showed correctly</p>
<p dir="auto"><img src="https://i.imgur.com/qwtz9kf.png" alt="0_1580222974610_5edd3313-d77c-44d3-b981-7cf2213b0c24-immagine.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">is seems to be an initialization problem but I can't realize where's the problem, using directly point-xid="TER_TRK-6.4_FML01-power-smart" works without problems:</p>
<pre><code>&lt;ma-point-values point-xid="TER_TRK-6.4_FML01-power-smart" point="powerLive" values="powerLiveValues"
          from="theTimeNow | moment:'startOf':'day' | moment:'add':3:'hours'"
          to="theTimeNow" rollup="LAST" rollup-interval="1 minutes"&gt;
        &lt;/ma-point-values&gt;
</code></pre>
<p dir="auto">Any idea about how to solve the problem?<br />
Thanks,<br />
Antonio</p>
]]></description><link>https://forum.mango-os.com/topic/4680/first-initializing-a-chart-using-ma-point-values-xid-built-using-other-datapoint-values</link><generator>RSS for Node</generator><lastBuildDate>Mon, 09 Mar 2026 09:06:54 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/4680.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 28 Jan 2020 14:43:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to First initializing a chart using ma-point-values xid built using other datapoint values on Fri, 31 Jan 2020 13:40:57 GMT]]></title><description><![CDATA[<p dir="auto">It's not working for me, I'll solve this repeating the page for any "trackerRowColumn" in the plant instead of creating a template to use for all the plant, thanks anyway.<br />
Antonio</p>
]]></description><link>https://forum.mango-os.com/post/24563</link><guid isPermaLink="true">https://forum.mango-os.com/post/24563</guid><dc:creator><![CDATA[etantonio]]></dc:creator><pubDate>Fri, 31 Jan 2020 13:40:57 GMT</pubDate></item><item><title><![CDATA[Reply to First initializing a chart using ma-point-values xid built using other datapoint values on Wed, 29 Jan 2020 19:07:21 GMT]]></title><description><![CDATA[<p dir="auto">Try using an ng-if, that way it won't load until you have the values in the browser to insert into the chart.<br />
I do that due to the fact there is always some delay with HTTP requests if you're using everything from the dashboard side without any javascript code.</p>
<p dir="auto">Fox</p>
]]></description><link>https://forum.mango-os.com/post/24560</link><guid isPermaLink="true">https://forum.mango-os.com/post/24560</guid><dc:creator><![CDATA[MattFox]]></dc:creator><pubDate>Wed, 29 Jan 2020 19:07:21 GMT</pubDate></item><item><title><![CDATA[Reply to First initializing a chart using ma-point-values xid built using other datapoint values on Wed, 29 Jan 2020 15:19:57 GMT]]></title><description><![CDATA[<p dir="auto">It seems that the first time the page is executed the</p>
<p dir="auto">&lt;ma-point-values point-xid="{{plantNameAcronym.value}}_TRK-{{trackerRowColumn.value}}_FML01-power-smart"</p>
<p dir="auto">becomes:</p>
<p dir="auto">&lt;ma-point-values point-xid="TER_TRK-6.4_FML01-power-smart"</p>
<p dir="auto">but ma-point-values is evaluated just when I switch from a graph type to the other.</p>
<p dir="auto">I've tried to use ng-init in an outer div to evaluate the point xid before but the result is always a blank graph.</p>
<ul>
<li></li>
</ul>
]]></description><link>https://forum.mango-os.com/post/24558</link><guid isPermaLink="true">https://forum.mango-os.com/post/24558</guid><dc:creator><![CDATA[etantonio]]></dc:creator><pubDate>Wed, 29 Jan 2020 15:19:57 GMT</pubDate></item></channel></rss>