<?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[Jquery and <ma-point-values>/<ma-serial-chart>]]></title><description><![CDATA[<p dir="auto">Hi all,</p>
<p dir="auto">I am trying to create a page which uses jquery to change html content of a modal but I am in kind of a slump here.</p>
<p dir="auto">I don't really understand why jquery does not work when I am trying to change the content of a modal. I am trying to change the graphs according to the ID of the object.</p>
<p dir="auto">The page is loaded by default with ID1</p>
<pre><code>                          &lt;div id="IDGraphs"&gt;
                            &lt;h4&gt;ID 1&lt;/h4&gt;

                            &lt;ma-point-values point-xid="DP_002129" values="ID1S1" latest="1000"&gt; &lt;/ma-point-values&gt;
                            &lt;ma-point-values point-xid="DP_481731" values="ID1S2" latest="1000"&gt; &lt;/ma-point-values&gt;
                            &lt;ma-point-values point-xid="DP_254259" values="ID1S3" latest="1000"&gt; &lt;/ma-point-values&gt;
                            &lt;ma-serial-chart style="height: 300px; width: 100%" series-1-values="SiloID1S1" series-1-point="point1" series-2-values="SiloID1S2" series-2-point="point2" series-3-values="SiloID1S3" series-3-point="point3"&gt;
                            &lt;/ma-serial-chart&gt;
                          &lt;/div&gt;
</code></pre>
<p dir="auto">This works perfetly!</p>
<p dir="auto">Then when the user clicks on a button element with another ID:</p>
<pre><code>                &lt;button type="button" class="btn btn-primary" data-toggle="modal" data-target="#data" id="ID2G"&gt;
                  Graph
                &lt;/button&gt;
</code></pre>
<p dir="auto">Which then triggers the jquery function which changes html content of the div with a .html function</p>
<pre><code>          $("#ID2G").click(function() {
            $("#IDGraphs").html('&lt;h4&gt;ID2&lt;/h4&gt;&lt;ma-point-values point-xid="DP_003575" values="point1Values" latest="1000"&gt; &lt;/ma-point-values&gt;&lt;ma-point-values point-xid="DP_298289" values="point2Values" latest="1000"&gt; &lt;/ma-point-values&gt; &lt;ma-point-values point-xid="DP_668214" values="point3Values" latest="1000"&gt; &lt;/ma-point-values&gt;&lt;ma-serial-chart style="height: 300px; width: 100%" series-1-values="point1Values" series-1-point="point1" series-2-values="point2Values" series-2-point="point2" series-3-values="point3Values" series-3-point="point3"&gt; &lt;/ma-serial-chart&gt;');
          });
</code></pre>
<p dir="auto">When I look the dev mode in chrome then I can see the change that the div has been changed corretly but the amchart has not been called out like it has when the site has been loaded at start.</p>
<p dir="auto">I guess the solution is to have jquery call function out so the chart and the data will update according to the changed data but I can't find the solution for that.</p>
<p dir="auto">Many thanks,<br />
Thomas</p>
]]></description><link>https://forum.mango-os.com/topic/2341/jquery-and-ma-point-values-ma-serial-chart</link><generator>RSS for Node</generator><lastBuildDate>Sun, 13 Sep 2026 17:03:21 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/2341.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 11 Jul 2016 10:30:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Jquery and <ma-point-values>/<ma-serial-chart> on Mon, 11 Jul 2016 17:37:14 GMT]]></title><description><![CDATA[<p dir="auto">Oh, sorry about this post, I was so stuck on changing the html change that I completely forgot that the function is right there in front of me. Case closed.</p>
]]></description><link>https://forum.mango-os.com/post/12043</link><guid isPermaLink="true">https://forum.mango-os.com/post/12043</guid><dc:creator><![CDATA[ThomasEinasto]]></dc:creator><pubDate>Mon, 11 Jul 2016 17:37:14 GMT</pubDate></item><item><title><![CDATA[Reply to Jquery and <ma-point-values>/<ma-serial-chart> on Mon, 11 Jul 2016 16:22:16 GMT]]></title><description><![CDATA[<p dir="auto">Hi Thomas.<br />
The way that you are manipulating the DOM using jQuery will not work with our AngularJS directives (ma-point-values, ma-serial-chart).<br />
From the looks of it you are trying to use a button to switch the data points for a serial chart? I would suggest taking a look at the templating examples in the documentation.<br />
-Jared</p>
]]></description><link>https://forum.mango-os.com/post/12041</link><guid isPermaLink="true">https://forum.mango-os.com/post/12041</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Mon, 11 Jul 2016 16:22:16 GMT</pubDate></item></channel></rss>