<?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[&lt;ma-pie-chart example does not work?]]></title><description><![CDATA[<p dir="auto">This example copied straight from the pie chart example in the API docs does not render anything in the play area.</p>
<p dir="auto">&lt;ma-pie-chart style="height: 300px; width: 600px" values="[{ "value": 30, "text": "hot", "color": "#ff9300" }, { "value": 70, "text": "cold", "color": "#942192" } ]"<br />
options="{depth3D:15,angle:30}"&gt;&lt;/ma-pie-chart&gt;</p>
]]></description><link>https://forum.mango-os.com/topic/2766/ma-pie-chart-example-does-not-work</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Apr 2026 15:54:57 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/2766.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 15 May 2017 19:10:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to &lt;ma-pie-chart example does not work? on Tue, 16 May 2017 18:09:28 GMT]]></title><description><![CDATA[<p dir="auto">Yes that was it... :)  Works with both methods. I like split better. Yes that was just me trying the statsObj array output as well as individual point method to see if there was a difference in how it worked.  Thanks again Guys.</p>
]]></description><link>https://forum.mango-os.com/post/14430</link><guid isPermaLink="true">https://forum.mango-os.com/post/14430</guid><dc:creator><![CDATA[Phillip Weeks]]></dc:creator><pubDate>Tue, 16 May 2017 18:09:28 GMT</pubDate></item><item><title><![CDATA[Reply to &lt;ma-pie-chart example does not work? on Tue, 16 May 2017 18:00:15 GMT]]></title><description><![CDATA[<p dir="auto">Try</p>
<p dir="auto"><code>&lt;ma-pie-chart style="height: 300px; width: 40%" values="[ { value: statsObj0.sum.value.split(' ')[0], text: 'hot', color: 'orange' }, { value: statsObj1.sum.value.split(' ')[0], text: 'cold', color: 'blue' } ]" options="{depth3D:15,angle:30}"&gt;&lt;/ma-pie-chart&gt;</code></p>
<p dir="auto">Meaning no parseFloat(), no number(), no {{ }}, and I don't think you can assign to a variable name like 'statsObj[0]' since that has the meaning item "0" in the statsObj obj (which is probably a list index). Although from your earlier post it looks like the points are the ones in a list? So that's an issue, the name for the statsObj is different in the ma-point-statistics tags earlier in the thread.</p>
]]></description><link>https://forum.mango-os.com/post/14429</link><guid isPermaLink="true">https://forum.mango-os.com/post/14429</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Tue, 16 May 2017 18:00:15 GMT</pubDate></item><item><title><![CDATA[Reply to &lt;ma-pie-chart example does not work? on Tue, 16 May 2017 18:02:04 GMT]]></title><description><![CDATA[<p dir="auto">OK look like what I need. the number with suffix is "250.50 LP5M"<br />
OMG this actually worked thank Gawd.. And thank-you for your help guys. :)</p>
<pre><code>&lt;ma-pie-chart style="height: 300px; width: 40%" values="[ { value: statsObj1.sum.value.slice(0,-5), text: 'hot', color: 'orange' }, { value: statsObj2.sum.value.slice(0,-5), text: 'cold', color: 'blue' } ]"
	options="{depth3D:15,angle:30}"&gt;&lt;/ma-pie-chart&gt; &lt;br&gt;
</code></pre>
]]></description><link>https://forum.mango-os.com/post/14428</link><guid isPermaLink="true">https://forum.mango-os.com/post/14428</guid><dc:creator><![CDATA[Phillip Weeks]]></dc:creator><pubDate>Tue, 16 May 2017 18:02:04 GMT</pubDate></item><item><title><![CDATA[Reply to &lt;ma-pie-chart example does not work? on Tue, 16 May 2017 15:41:32 GMT]]></title><description><![CDATA[<p dir="auto">I suspect this thread may have a workaround for you: <a href="https://forum.infiniteautomation.com/topic/2700/problem-with-statistics/9" rel="nofollow ugc">https://forum.infiniteautomation.com/topic/2700/problem-with-statistics/9</a></p>
<p dir="auto">It uses the slice() function on the value.</p>
]]></description><link>https://forum.mango-os.com/post/14427</link><guid isPermaLink="true">https://forum.mango-os.com/post/14427</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Tue, 16 May 2017 15:41:32 GMT</pubDate></item><item><title><![CDATA[Reply to &lt;ma-pie-chart example does not work? on Tue, 16 May 2017 15:54:41 GMT]]></title><description><![CDATA[<p dir="auto">Well that would be another good reason to move to mango 3<br />
We are v2.8 and this is my wip dashboard ..  can't I simply convert the string to a number somehow and enter that value?</p>
<p dir="auto"><img src="https://camo.nodebb.org/a265fa59514709bc6c0ffa1d478400b41348c3d8?url=https%3A%2F%2Fi.imgur.com%2Fh6iz1bl.png" alt="0_1494947320817_upload-b070560f-ecd1-4d52-bc4c-f4508a514440" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.mango-os.com/post/14422</link><guid isPermaLink="true">https://forum.mango-os.com/post/14422</guid><dc:creator><![CDATA[Phillip Weeks]]></dc:creator><pubDate>Tue, 16 May 2017 15:54:41 GMT</pubDate></item><item><title><![CDATA[Reply to &lt;ma-pie-chart example does not work? on Tue, 16 May 2017 14:54:51 GMT]]></title><description><![CDATA[<p dir="auto">Assuming you are running Mango v3, you can add <code>rendered="false"</code> to <code>&lt;ma-point-statistics&gt;</code> to get the stats as a number rather than a string.</p>
<p dir="auto">Sorry some of our documentation is not quite up to date, we are working on that for the UI 3.0.2 release.</p>
]]></description><link>https://forum.mango-os.com/post/14419</link><guid isPermaLink="true">https://forum.mango-os.com/post/14419</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Tue, 16 May 2017 14:54:51 GMT</pubDate></item><item><title><![CDATA[Reply to &lt;ma-pie-chart example does not work? on Tue, 16 May 2017 02:28:55 GMT]]></title><description><![CDATA[<p dir="auto">Thanks Phil, it was a cache issue causing the pie-chart not to render.<br />
My goal is to input 2 stats objects values as inputs for the value field of the values array list. I do not understand how to pass the parameter correctly..</p>
<p dir="auto">&lt;ma-point-statistics point="points[0]" from="from" to="to" statistics="statsObj1"&gt;&lt;/ma-point-statistics&gt;<br />
&lt;ma-point-statistics point="points[1]" from="from" to="to" statistics="statsObj2"&gt;&lt;/ma-point-statistics&gt;</p>
<p dir="auto">&lt;ma-pie-chart style="height: 300px; width: 600px" values="[ { value: statsObj1.sum.value, text: 'hot', color: '#ff9300' }, { value: statsObj2.sum.value, text: 'cold', color: '#942192' } ]"<br />
options="{depth3D:15,angle:30}"&gt;&lt;/ma-pie-chart&gt;</p>
<p dir="auto">I believe this breaks because  statsObj2.sum.value is returning a string that has the unit descriptor.  ie. "251.00  LP5M"  and value expects a number which I do not know how to convert to 251 inside the directive as in {{statsObj2.sum.value | limitTo:5}}</p>
<p dir="auto">can I use &lt;ma-calc here somehow?</p>
]]></description><link>https://forum.mango-os.com/post/14416</link><guid isPermaLink="true">https://forum.mango-os.com/post/14416</guid><dc:creator><![CDATA[Phillip Weeks]]></dc:creator><pubDate>Tue, 16 May 2017 02:28:55 GMT</pubDate></item><item><title><![CDATA[Reply to &lt;ma-pie-chart example does not work? on Mon, 15 May 2017 19:31:20 GMT]]></title><description><![CDATA[<p dir="auto">Hi Phillip,</p>
<p dir="auto">Huh, that's not what it looks like inside my API Docs tab for ma-pie-chart from Mango 3. I see this:</p>
<pre><code>&lt;ma-pie-chart style="height: 300px; width: 600px" values="[ { value: 30, text: 'hot', color: '#ff9300' }, { value: 70, text: 'cold', color: '#942192' } ]"
options="{depth3D:15,angle:30}"&gt;&lt;/ma-pie-chart&gt;
</code></pre>
<p dir="auto">The error in the one you posted is probably the double quote around the values object while double quoting all the keys / values inside it too. I see</p>
<p dir="auto"><img src="https://camo.nodebb.org/9c5bdefbc3c4442070b4b9bf7c140a3dfc2ffc96?url=https%3A%2F%2Fi.imgur.com%2FqPYSTk2.png" alt="0_1494876673845_pie.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.mango-os.com/post/14414</link><guid isPermaLink="true">https://forum.mango-os.com/post/14414</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Mon, 15 May 2017 19:31:20 GMT</pubDate></item></channel></rss>