Tidying Up
To recap on our progress so far – we have sorted out the Y-axis and bar-spacing. The headings and footnote are fine, and we have the right colours for the bars. Still left on the ‘todo’ list are:
- The x-axis is labelled but no axis line should be drawn here
- The margins need adjusting to accommodate the headings
- The bars themselves must be labelled with the data values, drawn inside each bar
- The entire chart should have a light grey background, and the key has a white rectangle drawn under it
The first challenge is to prevent the X-axis from being drawn. If we set the ‘NoAxis’ switch here, the labels will go away, so that does not work. What we can do is draw the axis itself with an invisible line! Set the style to ‘Invisible’ (any colour will do here) and it will vanish away. To get the bars labelled with the data-values, you might just guess that what you need to do is to type ‘values’ into the barchart style, but if you like hit the ‘...’ for this property just to be sure. You can turn off ‘Redraw axes’ as there are no axes to redraw. This style is just to avoid rounding errors (Windows metafiles are notorious for these) resulting in the bars eating into the thickness of the axis line.
Having reset the margins to something more reasonable (top,bottom,left,right = 64,48,16,16 work pretty well), our chart now looks like:
... but those values look very weedy, and anyway, they should be drawn inside the bars. You are probably looking for a ‘value style’ or ‘value font’ property somewhere in the left-hand tab – but you are not wrong, it really isn’t there! GraPL does not load up the sheet with every conceivable property when you first add a chart to the working design, as there are so many properties it would just be confusing. What we need to do is to go and grab a couple of extra properties and include them in our design.
Hit F12 again to bring the chart components pane back, and select the ‘Properties’ tab. This is a complete list of all the GraPL properties, sorted alphabetically. You might like to set it to the ‘Details’ view and read the short descriptions; to read the full documentation about each property, select it and hit F1 to see the entry in the reference help file. For now, just select ‘Value font’ and ‘Value style’ and drop them into the left pane, probably under the Barchart style:
If we choose ‘Inside,Transparent’ for the Value style, and set the font to ‘ARB,14,White’ then we are getting very close:
... but one small irritation remains – the 1998 figure for BT Cellnet is shown as ‘4’ rather than ‘4.0’. GraPL defaults to showing all formatted numbers with the minimum digits needed to fully represent the number. For numeric axis labels this is generally the correct approach, but here we would prefer some consistency in the formatting. Fortunately this is no problem – go back to the ‘Properties’ tab and drag in the ‘Value format’ property, then set it to ‘##0.0’ to force all the labels to show one digit before and after the decimal point. This is somewhere that you really could use some help, so just press F1 with the cursor in the edit field for this property and read the help topic on picture formatting.
The entire chart should be shaded lightly in grey, and the key should be blocked out with an un-edged white rectangle. Actually I think this style looks quite strange, and I certainly would not use it for a web-based graphic, but it does give us a chance to play with the key positioning and layout, so here goes ...
If you drag in a ‘Frame attributes’ property and hit its ‘...’ button (remember Ctrl+Enter is the keyboard shortcut) you can either set the colour to light grey, or simply make it Black with a 10% fill pattern.
Now for that key – select all 5 of the ‘Key’ properties and drop them at the end of the Barchart. When you pick a group of related properties like this, they are added as an indented set – to open up the key property, cursor down to it and press Shift+Enter to unroll it. You will find this a very handy keystroke – it unrolls or rolls up any collapsible section of the property tree, and is much faster than hunting for the ‘+’ with the mouse! You can set the key text to “Year end 1999,Year end 1998”, the key font to ‘Ar,14’, the key style to ‘Vertical,boxed’ and the key attributes to ‘white,solid,0’ to get an unedged white rectangle. Positioning the key frame involves a little trial and error, but the set of frame co-ordinates (x1,y1,x2,y2) = (260,210,410,260) looks close enough to the original to satisfy me.
Of course we may get another set of data next week, and you really don’t want to go through all that formatting again! The final topic in this first tutorial shows you how to save your completed graphic as a GraPL template so that you can use it again as a basis for new charts.
Continue to: Saving as a Template
|