Font sizes inside charts

Wednesday 13 February 2013 @ 9:46 am

If you have worked with charts you know that the font sizes can be a bit tricky. With most text objects and fields on a report, the font size is independent of the object size. You can make an object bigger but the font size doesn’t change.  But with charts, all font sizes are relative. Make a chart bigger and you automatically get bigger fonts for all the text in the chart.

This poses a challenge for getting labels or legend entries in your chart to be the same size as the text outside the chart. You can’t simply set them to the same number because the chart labels are relative. Setting it to size 10 may not result in size 10 font, so you have to play around a bit to get the sizes right. In some cases I have had to type the my own labels independent of the chart and line them up manually.

There is one other challenge that usually comes into play when you want very small chart fonts. With most text objects you can override the font size selector by typing in a smaller number that doesn’t exist in the drop down list. However in most places for charts you are limited to the drop down values. So for instance if you right click on a label below a bar and select “format axis label”, you will have to select a number from the size selector drop-down.  You can’t type a number in here.

But, if you need to override that list and type in an unlisted font size you can use an alternative method:

Go into the Chart Expert
Go to the TEXT tab
Select “Group Labels” from the list at the bottom
Click the “Font” button

Now you get a different font size interface that allows you to enter an unlisted font size (like 2). Thanks to Adam Butt of APB Reports in Trondheim, Norway for this last tip. Also note that if you are trying to change the size of the legend labels, the item for this in the TEXT tab is called “legend title” which might throw some people off. And, it only appears if you have activated a legend.

Leave a Reply

Recrystallize Pro

Crystal Reports Server