Forums

Forums / Developing Portals / Percentage on pie chart

Percentage on pie chart

Thread is closed for posting
3 posts, 1 answered
  1. smehdi
    smehdi avatar
    40 posts
    Registered:
    23 Mar 2015
    09 Jun 2015
    Link to this post
    Hi,

    I'm trying to display a CRM Pie chart on a page. How ​could I display percentages rather than the actual aggregate values for a series?

    Regards,

    Shan
  2. smehdi
    smehdi avatar
    40 posts
    Registered:
    23 Mar 2015
    09 Jun 2015 in reply to smehdi
    Link to this post
    Well , I managed to achieve this in CRM by customiz​ing the xml of the chart and importing it back. However, it still is displaying numbers in the portal widget even after refreshing meta data.

    Here's the series section from Chart's xml file. I've ​changed IsValueShownAsLabel​ and added Label and LabelFormat which did the trick in CRM. However, no effect in the portal.

    <Series ShadowOffset="0" IsValueShownAsLabel="False" Label="#PERCENT" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="PieLabelStyle=Inside, PieDrawingStyle=Default" ChartType="pie" LabelFormat="#0.##%">
              <SmartLabelStyle Enabled="True" />

    Please let me know which property I need to change in the widget.
  3. Clinton Bale
    Clinton Bale avatar
    126 posts
    Registered:
    21 Feb 2014
    Answered
    10 Jun 2015 in reply to smehdi
    Link to this post
    Hello Shan,

    Percentage based charts are currently not supported by the Charting widgets in TPC. This was a lapse on our part and this functionality will be included in an upcoming TPC 3.x release.

    In the meantime, the only way for TPC to display true percentage values is if the data from CRM is coming back as a percentage value. For example: 0.5 would be 50%. You can change the label format string once the data is in percentage values to {0:p} which would convert 0.5 > 50.0%.

    Best Regards,
    Clinton
3 posts, 1 answered