Everything ScaleBreak in MS CRM 2011 Charts

Adding a ScaleBreak to charts in CRM can be useful when you have data that varies a lot. For example one column with a very high value, can dwarf the rest so it is impossible to see the details in them.

Luckily, MS CRM 2011 allow us to add a ScaleBreakStyle to our chart xml. This post is technically a follow up to my Axis Modifications – Part 1 I did some time ago. That was a rather long post. I’ll break my Axis series in to smaller pieces from now on. Otherwise, I’ll never get around to it.

ScaleBreakStyle Added to CRM Chart xml in MS CRM 2011
CRM Chart with ScaleBreak added

The ScaleBreakStyle has list of properties, which allow us to modify the settings of the ScaleBreak in case the default settings doesn’t meet our needs.

The ScaleBreakStyle Properties are:

  • Enabled
  • BreakLineStyle
  • CollapsibleSpaceThreshold
  • LineColor
  • LineDashStyle
  • LineWidth
  • MaxNumberOfBreaks
  • Spacing
  • StartFromZero

Add these as necessary to the Y Axis properties in the chart xml. Here they are, highlighted in the xml, all of them listed with their default value.

<AxisY LabelAutoFitMinFontSize="8" TitleForeColor="59, 59, 59" TitleFont="{0}, 10.5px" LineColor="165, 172, 181" IntervalAutoMode="VariableCount">
   <MajorGrid LineColor="239, 242, 246" />
   <MajorTickMark LineColor="165, 172, 181" />
   <LabelStyle Font="{0}, 10.5px" ForeColor="59, 59, 59" />
   <ScaleBreakStyle Enabled="True"
     BreakLineStyle="Ragged"
     CollapsibleSpaceThreshold="25"
     LineColor="59,59,59"
     LineDashStyle="Solid"
     LineWidth="1"
     MaxNumberOfBreaks="2"
     Spacing="1.5"
     StartFromZero="Auto" />
</AxisY>

Normally MS CRM 2011 puts all the properties on one line. For readability, I listed them here below each other. Both works just fine in the xml, so it’s just a matter of preference.

Let’s go through the ScaleBreakStyle properties one by one. Note that if one of the properties is left out, the default value will be used.

Enabled

Values: “True”, “False”

Naturally, this should be set to True. The only reason I would set it to “False” is if I’m testing a chart and need to temporarily turn of the ScaleBreak, but without removing the code.

BreakLineStyle

Values:

  • Straight
    BreakLineStyle Straight in MS CRM 2011 CRM Chart
  • Wave
    ScaleBreak BreakLineStyle Wave in MS CRM 2011 CRM Chart
  • Ragged (default)
    ScaleBreak BreakLineStyle Ragged (default) in MS CRM 2011 CRM Chart
  • None
    ScaleBreak BreakLineStyle None in MS CRM 2011 CRM Chart

The official description for BreakLineStyle=”None” is that the scale break is not displayed. As you can see in the picture, it just means there’s no scale break line. The scale break is still there.

CollapsibleSpaceThreshold

  • Default value = 25
  • Min value = 10
  • Max value = 90

The CollapsibleSpaceThreshold property is a percentage of the Y axis. The default value for 25 means that the data in your series must have a difference of at least 25% for the ScaleBreak to appear.

In other words, you can toggle the sensitivity the scale break using a number between 10 and 90. The lower the value, the more scale breaks might appear. Only an evaluation of the data presented can tell you what the right amount should be. However, 25 is the default for a reason and it should work for most cases.

LineColor

Default value: “59, 59, 59”

You can add any color here. See this post for more information on colors.

LineDashStyle

  • NotSet (default)
  • Dash
    XLineDashStyleDash
  • DashDot
    XLineDashStyleDashDot
  • DashDotDot
    XLineDashStyleDashDotDot
  • Dot
    XLineDashStyleDot
  • Solid (default)
    XLineDashStyleSolid

NotSet and Solid will display a solid line for the scale break, which is also the default.

LineWidth

  • Default value =  1
  • Min value = 1
  • Max value = 10

The thickness of the line measured in pixels

MaxNumberOfBreaks

  • Default value = 2
  • Min value = 0
  • Max value = 5

How many scale breaks in your chart will you allow? The chart engine supports up to 5 scale breaks. Not sure why zero is an option here??
Leave it out and it will allow up to 2 scale breaks.

MaxNumberOfBreaks along with CollapsibleSpaceThreshold are really the two settings that define how the scale break is calculated. The rest is mostly regarding the visual presentation of the break.

Spacing

  • Default value = 1.5
  • Min value = 0
  • Max value = 10
ScaleBreak Spacing Default value in MS CRM 2011 CRM Chart
Spacing=”1.5″ Default value
ScaleBreak Spacing 10 max value in MS CRM 2011 CRM Chart
Spacing=”10″ max value

Spacing, like CollapsibleThreshold, is measured as a percentage of the Y axis, although your range of values is a lot smaller. The default is 1.5, so it obviously allow for decimals. Up to at least 3 if you want to very specific on your spacing. Note that Spacing creates an actual gap in the Y Axis.

StartFromZero

Values:

  • Auto (default)
  • Yes
  • No

StartFromZero defines if the chart should start looking for possible scale breaks from either zero, or from the lowest value in your data set. Auto seems to do a good job, but if there are situations where you want to force it one way or the other, it is possible.

Some Observations

ScaleBreakStyle seems to work on most relevant charts incl. Column, Bar, Area, Spline, Kagi, Point, Line, FastPoint & FastLine. It also works on Multi Series Charts. These are just examples.

ScaleBreak on chart type Area in MS CRM 2011 CRM Chart ScaleBreak on chart type Bar in MS CRM 2011 CRM Chart ScaleBreak on chart type Kagi in MS CRM 2011 CRM Chart ScaleBreak on chart type Point in MS CRM 2011 CRM Chart ScaleBreak on chart type Spline in MS CRM 2011 CRM ChartScaleBreak on Multi Series Column Chart in MS CRM 2011 Chart

The ScaleBreak does NOT work on Stacked Charts or Stacked 100 Charts. You can add the ScaleBreak, but it won’t make display in the chart.

Reduce the ScaleBreak to a line

Setting Spacing=”0″ reduces the Scale Break to a line. Then use LineColor and LineWidth to define the ScaleBreak. Do note that Spacing actually creates a gap in your Y Axis while the LineWidth just paints on top of the Y Axis.

ScaleBreak Reduced to Line with Spacing 0 in CRM Chart for MS CRM 2011

Make the ScaleBreak invisible

Use with CAUTION. Could be very misleading

  • Spacing=”0″
  • BreakLineStyle=”None”

ScaleBreak made invisible with Spacing 0 and BreakLineStyle None

Notice the jump in the axis values. Aside from that, there’s no indication that a ScaleBreak was added.

3D?

Nope – you lose the ScaleBreak feature if you add <Area3DStyle Enable3D=”true”/>

Can edit in the Chart Designer and keep the ScaleBreak

If you have imported your ScaleBreak chart as a personal chart, you can open it in the editor and make changes to the series etc. without losing the ScaleBreak. Sometimes xml customizations will disappear when using the Chart Designer, but in the case of ScaleBreaks you are good to go.

ScaleBreak in MS CRM 2011 Chart Designer

You can find the official reference on the AxisScaleBreakStyle here.

Hope you enjoyed this post.

If you did, please follow me on Twitter for CRM Chart updates

Now, I gave the post the arrogant title of “Everything ScaleBreak”. If I missed something, please let me know in the comments and I’ll update the post 🙂

5 thoughts on “Everything ScaleBreak in MS CRM 2011 Charts

  1. Great post, as always!
    Scale breaks are especially handy when you have one series which is so extreme that I no longer care about comparing it visually to the others but want the rest to compare cleanly. The one which usually stands out on the first draft of a dashboard chart is the category for “blank” when using a non-required or recently added field. You may not want to filter it out as the “blank” serves to remind people these records need completing (say for Account industry or Contact job role), so breaking the axis is a great way to prevent this dominating.
    Two things I would steer clear of generally:
    – multiple breaks – use with caution as these really start to distort the value of the visual comparison of lengths of bars or heights of dots.
    – using breaks on line or area charts – we are attuned to reading these partly by the *slope* of the lines between points, which represent a rate of change of value between points, as much as by the height or values themselves. Breaks between values introduce severe flattening which makes the lines slope a lot less and the rates appear very misleading. A break below the lowest value is not such a big deal here, so StartFromZero = Yes could make good sense.

  2. Hi CRM chart guy –

    Your website is amazing; I reference it all the time. Keep up the great work!

    My question regarding line breaks – is it possible to get line breaks to work in a bar chart (x-axis)? I can’t seem to conjure up the right code to make it happen. I can get it to work on the y-axis in column charts but not on the x-axis. You have one pictured under “Some Observations” in the top right but I can’t figure it out on my end. Please help! Thanks!

    • Hi Shawn

      Thanks for the comments.

      On Bar charts the X and Y axes have swtiched places. So technically it is still the Y axis that you need to add the scalebreak to.

  3. Hi CRM chart guy–

    The content in your website is more informative and thanks a lot that you are helping lot of other developers with your posts.

    This post is explaining different ways to modify the charts by editing XML, but I had a question to you that Is there any add-ons to CRM available in the market that enables percentage on dashboard charts??
    Our users create there own dashboards but they doesnt have priviliages to edit the XML to show percentages, so please let me know about the details of addons to CRM that enables percentages for dashboard charts with out modifying the XML.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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