Agile Central - Charts: Can we limit pie chart decimal to two decimal points?

Document ID : KB000122780
Last Modified Date : 08/12/2018
Show Technical Document Details
Question:
We noticed that in the User Stories Pie Chart the decimal point is very long. Is there a way to limit to 2 decimal points?

User-added image
Answer:
There isn't a way to make a change to the database or the user stories' data. You can, however, slightly tweak the pie chart's HTML source code to fix this. 

Attached you can find the source code of the pie chart. In this code sample, please find lines 897 and 913 where the code was tweaked to allow only 2 decimal points. These lines have been updated to be as follows:

pointFormat: '<b>{point.name}:</b> {point.percentage:.2f}% ({point.y:.2f}/{point.total:.2f})'

You can download the attached source code and examine lines 897 and 913.


What you should do if you wanted to apply this is:
- Create a Custom Page, then include a Custom HTML app into your page.
- In the source code of your custom html app, paste the source code attached herein.


The resulted pie chart will have only two decimal points, as in:

User-added image
File Attachments:
PieChart-TwoDecimalPoints-SourceCode.txt