<?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[Change XID dynamically]]></title><description><![CDATA[<p dir="auto">Hello, I need to create a button(not a points list) that changes the XID of an existing &lt;ma-get-point-value&gt; to redraw a chart.</p>
<p dir="auto">Is there a way?</p>
]]></description><link>https://forum.mango-os.com/topic/4040/change-xid-dynamically</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Apr 2026 11:06:13 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/4040.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 31 Jan 2019 09:02:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Change XID dynamically on Thu, 31 Jan 2019 16:30:17 GMT]]></title><description><![CDATA[<p dir="auto">Here's another way of doing it that will only fetch the values for the selected point. The buttons also highlight to show which point is selected.</p>
<pre><code>&lt;!-- set the initial data point XID for when the page loads --&gt;
&lt;div ng-init="dataPointXid = 'temperature'"&gt;&lt;/div&gt;

&lt;ma-get-point-value point-xid="{{dataPointXid}}" point="selectedPoint"&gt;&lt;/ma-get-point-value&gt;
&lt;md-button ng-click="dataPointXid = 'temperature'" ng-class="{'md-raised': dataPointXid === 'temperature'}"&gt;Data point 1&lt;/md-button&gt;
&lt;md-button ng-click="dataPointXid = 'voltage'" ng-class="{'md-raised': dataPointXid === 'voltage'}"&gt;Data point 2&lt;/md-button&gt;

&lt;ma-point-values point="selectedPoint" values="pointValues" from="dateBar.from" to="dateBar.to" rollup="{{dateBar.rollupType}}" rollup-interval="{{dateBar.rollupIntervals}} {{dateBar.rollupIntervalPeriod}}"&gt;
&lt;/ma-point-values&gt;

&lt;ma-serial-chart style="height: 300px; width: 100%" series-1-values="pointValues" series-1-point="selectedPoint"&gt;
&lt;/ma-serial-chart&gt;
</code></pre>
<p dir="auto"><img src="https://camo.nodebb.org/694d8942ea16fbe6743b8cf18420c7b4f8dfb613?url=https%3A%2F%2Fi.imgur.com%2FnzrsW5O.png" alt="0_1548952726907_cca593a7-6577-4b09-b4b7-70066a9d8e9a-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.mango-os.com/post/21227</link><guid isPermaLink="true">https://forum.mango-os.com/post/21227</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Thu, 31 Jan 2019 16:30:17 GMT</pubDate></item><item><title><![CDATA[Reply to Change XID dynamically on Thu, 31 Jan 2019 12:05:20 GMT]]></title><description><![CDATA[<p dir="auto">Hi Davide</p>
<p dir="auto">I think it might be better to pull both points that you want with the <code>&lt;ma-get-point-values&gt;</code> and then changing the array that gets given to your chart.  I did a quick markup as an example.</p>
<pre><code>&lt;ma-point-values point-xid="DP_5c7692d5-6c59-4cfd-aa79-1236b68e7270" values="point1Values" from="dateBar.from" to="dateBar.to" rollup="{{dateBar.rollupType}}" rollup-interval="{{dateBar.rollupIntervals}} {{dateBar.rollupIntervalPeriod}}"&gt;
&lt;/ma-point-values&gt;
&lt;ma-point-values point-xid="DP_9c9deaf1-9a7f-4fce-8e12-c104efb3ce96" values="point2Values" from="dateBar.from" to="dateBar.to" rollup="{{dateBar.rollupType}}" rollup-interval="{{dateBar.rollupIntervals}} {{dateBar.rollupIntervalPeriod}}"&gt;
&lt;/ma-point-values&gt;

&lt;ma-serial-chart style="height: 300px; width: 100%" series-1-values="point3" series-1-point="point1" series-1-type="line" series-1-color="red"  legend="true" balloon="true" options="{valueAxes:[{minimum:0, axisColor:point1Color, color:point1Color}, {axisColor:point2Color, color:point2Color}]}"&gt;
&lt;/ma-serial-chart&gt;
   
&lt;ma-button id="61cd6615-b20f-4423-9508-5b8acc1862e0" ng-click="point3 = point1Values" raised="true" style="position: absolute; left: 97px; top: 442px;"&gt;&lt;/ma-button&gt;
&lt;ma-button id="f2bb2cfd-615f-48ff-9e07-8eede54f690e" ng-click="point3 = point2Values" raised="true" style="position: absolute; left: 201px; top: 442px;"&gt;&lt;/ma-button&gt;```</code></pre>
]]></description><link>https://forum.mango-os.com/post/21222</link><guid isPermaLink="true">https://forum.mango-os.com/post/21222</guid><dc:creator><![CDATA[CraigWeb]]></dc:creator><pubDate>Thu, 31 Jan 2019 12:05:20 GMT</pubDate></item></channel></rss>