<?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[Pie Chart]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Attached below for my script for creating a pie chart. I have 2 issues which I do not know how to do. Appreciate you can assist me.</p>
<ol>
<li>
<p dir="auto">How to show datapoint value into the pie chart? Currently, it can be included by hardcoding it under "text:" However, I will like this to link to datapoint value instead of hardcoding it. I had put it as "text :   myPoint.value" or "text :   {myPoint.value}", it doesn't work. You can find this in the script provided below under section where "allLabels".</p>
</li>
<li>
<p dir="auto">How to show a value which is derived using formula into the pie chart? The formula is basically using the datapoint / 144 x 100. Refer to "text :  'Overall Efficiency 87% actual / target x 100' ".</p>
</li>
</ol>
<p dir="auto">Script:</p>
<p dir="auto">&lt;ma-get-point-value point-xid="CRWPOE_KP_C01" point="myPoint"&gt;&lt;/ma-get-point-value&gt;</p>
<p dir="auto">&lt;p&gt;The point name is "{{<a href="http://myPoint.name" rel="nofollow ugc">myPoint.name</a>}}" and its value is {{myPoint.renderedValue}}.&lt;/p&gt;</p>
<p dir="auto">&lt;ma-pie-chart style="height: 300px; width: 600px" values="[ { value: myPoint.value, text: 'Actual', color: '#942192' }, { value: 2-myPoint.value, text: 'Gap', color: '#ffffff' } ]"<br />
options="{<br />
titles: [{<br />
text: '',<br />
size: 15<br />
}],</p>
<p dir="auto">depth3D:0,<br />
angle:0,<br />
innerRadius: '60%',<br />
allLabels: [{<br />
y: '52%' ,<br />
align:  'center' ,<br />
size: 25,<br />
bold : 'true',<br />
text : '99',<br />
color :  '#555',</p>
<p dir="auto">}, {<br />
y :  '44%' ,<br />
align :  'center' ,<br />
size : 12,<br />
<strong>text :   myPoint.value,</strong><br />
color :  '#555'}, {<br />
y :  '20%' ,<br />
align :  'center' ,<br />
size : 25,<br />
bold : 'true',<br />
<strong>text :  'Overall Efficiency 87% actual / target x 100' ,</strong><br />
color :  '#555'}]<br />
}" &gt;&lt;/ma-pie-chart&gt;</p>
<p dir="auto">Thanks.</p>
<p dir="auto">Regards,<br />
Felicia</p>
]]></description><link>https://forum.mango-os.com/topic/2730/pie-chart</link><generator>RSS for Node</generator><lastBuildDate>Mon, 17 Aug 2026 13:43:12 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/2730.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 14 Apr 2017 16:54:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Pie Chart on Mon, 17 Apr 2017 18:44:05 GMT]]></title><description><![CDATA[<p dir="auto">Hi Felicia,</p>
<p dir="auto">It doesn't look like there really is a direct way to achieve what you're asking. However, have you considered putting the pie chart inside a div with another div absolutely positioned into the place you'd like the label?</p>
<p dir="auto">Something like...</p>
<pre><code>&lt;div&gt;
  &lt;ma-pie-chart style="position:relative;" ...&gt;&lt;/ma-pie-chart&gt;
  &lt;div id="pie-chart-center-label" style="position:relative; left: 75px; top: 55px;"&gt;Value: {{myPoint.value}}&lt;/div&gt;
&lt;/div&gt;
</code></pre>
]]></description><link>https://forum.mango-os.com/post/14209</link><guid isPermaLink="true">https://forum.mango-os.com/post/14209</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Mon, 17 Apr 2017 18:44:05 GMT</pubDate></item></channel></rss>