locked
How can you format the axis labels in CRM 2011 charts? RRS feed

  • Question

  • Hi,

    I'm currently working on a line chart and I think it would look better if Y axis numbers showed the numbers in M$ instead. Is there an easy fix to define the format it the .xml code? Thanks in advance

    Example:

    Thursday, September 20, 2012 1:15 PM

Answers

All replies

  • I would go look:

    MS Chart control examples at: http://archive.msdn.microsoft.com/mschart

    At MSDN Library for Chart controls: http://msdn.microsoft.com/en-us/library/dd489238.aspx


    Rune Daub Senior Consultant - Dynateam CRM http://www.xrmmanagement.com

    Thursday, September 20, 2012 2:39 PM
  • Add LabelFormat in the Series tag:

    • LabelFormat = “‘$’#,0,,,.00;(‘$’#,0,,,.00)” millions
    • LabelFormat = “‘$’#,0,.00;(‘$’#,0,.00)” thousands

    Example:

    <
    Series ChartType=”Column” IsValueShownAsLabel=”True” Font=”{0}, 11.5px LabelForeColor=”0,0,128 CustomProperties=”PointWidth=0.75, MaxPixelPointWidth=10“ LabelFormat=“‘$’#,0,.00;(‘$’#,0,.00)”></Series>

    Friday, September 21, 2012 7:59 AM
  • Hi, sorry for all these questions, but in my case, I've got two Y axis, and the Y1 axis is the one that sums the values where I think the formatting should be implemented. I've tried to add the LabelFormat, but I'm  probably doing something wrong... Thanks again for your help!

    Here's some of the xml.

    <Series>
            <Series ChartType="Line" IsValueShownAsLabel="True" BorderWidth="3" MarkerStyle="Square"

    MarkerSize="9" MarkerColor="37, 128, 153" MarkerBorderColor="37, 128, 153">
    </Series>
            <Series ChartType="Line" IsValueShownAsLabel="True" BorderWidth="3" MarkerStyle="Square"

    MarkerSize="9" MarkerColor="37, 128, 153" MarkerBorderColor="37, 128, 153"YAxisType="Secondary">  

    </Series>
          </Series>

    Friday, September 21, 2012 12:44 PM
  • Hi TobiasET

    This one is a little tricky. If you want to format the labels on the Y Axis, or X Axis, you have to do it under the appropriate axis with a Format="#,#" depending on the format type that you want. The Format property needs to go inside the <LabelStyle> tag within the Axis.

    The LabelFormat in the Series will only format the value shown on top of the column. Using LabelFormat in the Axis will not work.

    Although this blog post is for a different scenario, I'm using both the "Format" and "LabelFormat" in it, so it might be worth a look.
    http://crmchartguy.wordpress.com/2013/02/07/add-insight-to-your-pipeline-with-advanced-goal-charts/


    Ulrik,
    Blog: http://crmchartguy.wordpress.com

    Tuesday, March 12, 2013 1:18 AM
  • Refer to the below article about charts:

    http://social.technet.microsoft.com/wiki/contents/articles/16564.microsoft-dynamics-crm-2011-charts-customization.aspx


    If the answer helped you, remember to mark it as answer.

    Friday, March 29, 2013 6:17 AM
    Moderator
  • Export the RDL file and do the changes in SSRS and upload it
    Friday, March 29, 2013 6:32 AM