It might be a well-hidden secret, but it is actually fairly easy to add extra comments or annotations to your charts in MS Dynamics CRM.
This could be for extra descriptions or guidance on how to interpret the chart.
Here is an example of a chart with an annotation added.
This example is simple, but the annotation can be customized with different fonts, sizes, positioning, have a tool-tip, etc.
Before moving on, I would highlight that a well-designed chart should not need any additional explanation ever. However, no rule without exceptions, so if you do need to add annotations to your chart, here’s how it is done.
Take any chart you want to add the annotation to, export the chart xml and add this piece of code towards the bottom between the </Legends> and </Chart> tags.
If you copy the code below, only include <Annotations> through </Annotations>.
The coordinates, X=”50″ and Y=”0″, sets the position of the annotation. They are percentages with 0,0 in the upper left corner and 100,100 in the bottom right. 50,50 would be right in the middle. In this sample I used x 50 and Y 0 to put the chart annotation centered on top.
Text is what you want the annotation to say.
TextStyle I have set to Default, but the options are Default, Embed, Emboss, Frame and Shadow.
Font=”Verdana, 15px” is the font type and size. Here is a good list of fonts if you want to switch it.
ForeColor sets the color of the font. See my previous post on colors in CRM charts for details.
Finally, you can add a tool-tip if you want to elaborate further.
You can find all the details on annotations on https://msdn.microsoft.com/en-us/library/system.web.ui.datavisualization.charting.textannotation%28v=vs.110%29.aspx
While annotations can be helpful in some cases, they unfortunately do not support keywords or any other dynamically inserted data. This means, for example, that you cannot add a total, average, or other keywords in the annotation.
Thank you for reading. Please sign up for the newsletter to stay up to date on new blog posts and follow me on Twitter Follow @crmchartguy