Removing Axis Titles, Legend and Axis Labels in CRM Charts for MS CRM 2011

CRM 2011 Charts come with a lot of information around the chart graphic itself. If the Axis Titles or Legends or maybe even the labels are redundant, it can make sense to remove them. This will make the chart graphic itself bigger, and for charts on subgrids, you can utilize the scarce space much better.

First let’s have a quick look at what is what:

Original chart with indicators

  • Highlighted in yellow: The chart Legend
  • Underlined in Red: The Axis Titles
  • Underlined in blue: The Axis Labels

Now, I’m not suggesting that removing the axis title, legend and axis labels all on one CRM chart is a good idea. It certainly is not, but it works for demonstration purposes.

Remove the Legend in CRM Charts

Export and open up your chart xml. In this example I use the Cases By Priority (Per Day) case chart that comes out of the box with Microsoft Dynamics CRM 2011.

On this type of chart the Legend is determined by the Series of the data. That means we have to toggle the visibility in the Series section with a Series property. Looking for a fitting Legend property won’t do you any good. Exception mentioned in the notes at the bottom of this post.

2 - No Legend IsVisibleInLegend False

To remove the Legend I add the property IsVisibleInLegend=”false” to the series.

Let’s import the chart xml and have a look.

No Legend and the chart is now taking up more of the space available.
No Legend and the chart is now taking up more of the available space.

Remove the Axis Titles in CRM Charts

The tricky part here is, that to my knowledge, there is no property that will allow us remove the Axis Title similarly to what we did with the Legend. However, that does not mean we can’t use other Axis Properties to tamper with it, and make it look like we’ve removed it.

Here’s how I change the chart xml.

3 - No Titles they are transparent

I added the Title property to each Axis. That way I control what the title is. I went with something really short in this case, “y” and “x”.

Then I changed the color of the title with TitleForeColor=”Transparent”.

Finally I reduced the font size to the lowest possible amount that I know charts in CRM 2011 will accept, which is 3 pixels. I do this because we want the now transparent text to take up less space. That is also why I went with the short names.

Let’s import and have one more look at the chart.

Axis Titles in the CRM chart has now been removed, although "hidden" might be a more accurate term.
Axis Titles in the CRM chart has now been removed, although “hidden” might be a more accurate term.

Remove the Axis Labels in CRM Charts

For fun, let’s just use the same trick on the Axis Labels and remove them too.

Transparent axis labels in the chart xml

LabelStyle font and color I’ve changed similarly, to what I did with the Axis Title, 3px and transparent.

One last look and we can now say for sure it doesn’t make any sense to continue.

No Legend, no axis titles , no axis labels.
No Legend, no axis titles , no axis labels.

But if you really want to, you can find the instructions on completely disabling the axis in this post.

A couple of notes:

Some charts have <Legends> tags towards the bottom of the chart xml. If these were generated by CRM 2011, then you should be able to remove the legend, simply by removing that entire section.

Also, instead of naming the axes “y” and “x”, I could have given them longer and more descriptive names. Those names would then show up, if the User hovers the mouse over the axis. The same thing can be achieved with the ToolTip property. Either might be a better approach than the shorter names as the lenght of the title seem to have very limited or no influence on the utilization of space around the chart graphic. However, the font size does have an influence, so keep it small if you are trying to utilize the space as best as possible.

Thanks for reading. Please follow me on Twitter to get notified on new posts exclusively about CRM Charts for MS CRM 2011.

8 thoughts on “Removing Axis Titles, Legend and Axis Labels in CRM Charts for MS CRM 2011

  1. This site is great! I’ve learned so much. Thank you! I hope you can help with something I’m struggling with. I’m trying to format the yaxis on my chart to show $200M from a number in the system like $200,000,000.00 I’ve entered this code into the xml of my form, but returns an error on import. I found this on another site.

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

    I feel like it should be easy but every combination I try doesn’t return the value I’d like. Can you help?

    Thanks again

  2. I have a opportunity column chart which has a grouping at quarter level of created date. How can we control the Axis labels format as Q1-2014,Q2-2014 instead of Quarter 1 of 2014/Quarter 2 of 2014

    • The date labels are aligned with the format in system settings. So you can tweak the date format a little. Unfortunately this only applies to dates, not quarters.
      However, if your fiscal period is aligned with calendar quarters, you can use the fiscal year settings in business management to modify the labels. And then use Fiscal Period in your chart rather quarters.

  3. Thanks for the reply. I was able to change it with fiscal period. When the date is set to some exceptionally high value like (1/1/3100) the chart fails to render the data. Is there any limitation on the year value when using Fiscal period.

  4. Great site! I’m wondering if it is possible to see number of cases by the hour. The smallest unit I am able to get down to in the Chart Designer is “day.” Is there a way to customize the .xml to achieve this?

  5. Thank you for putting this site together! Hopefully you’re still monitoring it. I have a quick question. Using CRM 2013 I have two charts that are bar charts that are grouped by a date weekly. The users are all complaining that it says “Week {#} of {Year}”. Instead they want it to say “Week beginning {date}” where {date} is the Monday of the week. I haven’t found a real good solution to this yet. Please help.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s