Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Pie Chart Percentages
Erebel55
I have a pie chart that displays the cost percentage for an Application.
However, I only want to show the top 10 most expensive applications in the pie chart because when displaying anything more than that the chart gets hard to read.
So, I added a filter to the pie chart that looks like this
Find more posts tagged with
Comments
kclark
From the chart UI > format chart > series > value series > check show series labels then you can add percentile value data from here.
Erebel55
Right, that is how I am currently doing it and it works fine.
kclark
I'm sorry I misunderstood
Let me see if I can't write an example report.
Erebel55
No problem at all. Thanks that would be awesome
kclark
Ok, so I had to create a computed column to do this. The computed column totals all payments. Then I created a PGV storing that value. I then created labels on the pie chart showing value data and was able to show the percentages based on the entire data using this script.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>function beforeDrawDataPointLabel( dph, label, icsc )
{
var totals = parseFloat(icsc.getExternalContext().getScriptable().getPersistentGlobalVariable("totals"));
var current = label.getCaption().getValue();
current = current.replace(",", "");
var percentage = parseFloat( (current/totals) * 100 );
label.getCaption().setValue(percentage + "%" + " (" + current + ")")
}
</pre>
Erebel55
This is exactly what I needed.
Thanks so much!!
kclark
You're welcome! Glad it's working