Charts 2007
Charts 2007
Contents
Introduction ..............................................................................................................1
The Data Set ..............................................................................................................2
Creating a Chart ....................................................................................................... 2
Modifying the Chart Settings ..............................................................................3
Area and Line Settings .................................................................................. 3
Axis Settings ..................................................................................................... 5
The Chart Tools Format Tab ................................................................................6
The Chart Tools Layout Tab .................................................................................7
The Labels Group ............................................................................................ 7
The Axes Group ............................................................................................... 8
The Background Group ................................................................................ 9
The Analysis Group ........................................................................................ 9
The Chart Tools Design Tab .............................................................................. 10
The Type Group ............................................................................................ 11
Combination Charts ........................................................................... 11
X-Y Charts .............................................................................................. 12
Templates .............................................................................................. 12
The Data Group ............................................................................................ 13
Chart Layouts ................................................................................................ 13
Chart Styles ................................................................................................... 14
Themes ..................................................................................................................... 14
Other Information ................................................................................................ 15
Copying Charts from Excel into Word ................................................... 15
Problems with Chart Colours in PowerPoint ...................................... 15
Preserving Colours with Excel 2003 ...................................................... 15
Pattern Fill ...................................................................................................... 15
Introduction
Microsoft Excel's charting capabilities are excellent. Many people just use Excel to store data
and then create graphs. This course is designed not just to show you some of the more obvious
features (such as Chart Type) but also some of the more obscure.
The Data Set
Begin by typing in some data:
1. Start up Microsoft Excel as usual (or press <Ctrl n> for a new workbook)
2. In cell A1type the number -1 then press <Ctrl Enter> to stay in the cell
3. Drag the cell handle down to cell A12 – the cells should all show the number -1
4. Click on the AutoFill Options button and choose Fill Series – you should now have numbers -1 to 10
Creating a Chart
Now that you have some data, you can draw a simple chart. In this first exercise you’ll see exactly how Excel
uses this data to do this:
1. Check that the data (cells A1 to A12) is still selected – it’s a good idea to select the data first
2. Move to the Insert tab and note the different types of chart available in the Charts group
3. Click on the first type [Column] and choose the first sub-type (2-D Clustered Column)
A chart should appear on the current worksheet (centrally placed). You’ll see later how to place charts on
their own separate sheets. Note the following:
a. All twelve values are plotted
b. The data is called Series 1 in the legend because Excel couldn’t find a name for the data set
c. The horizontal (x-) axis is labelled 1, 2, 3 … 12 (reflecting the row numbers) and is equally spaced
d. The columns are drawn in the centre of each division and only occupy part of the space
e. The vertical (y-) axis is labelled from -2 to 12 in steps of 2
You’ll see later how to change some of these settings. First, change the data to give the series a heading:
4. Type xxx into cell A1 (and press <Enter>)
You’ll find that xxx is interpreted as another zero value (the first two column divisions are both empty) and
that the vertical axis is automatically redrawn as there are no longer any negative values.
5. Press <Ctrl a> to select the data again then repeat steps 2 & 3
A second chart appears (placed over the old one) but this time:
a. Only eleven values are plotted
b. The value in cell A1 is used both for a chart title and as a label in the legend on the right
c. The vertical (y-) axis starts at 0
To see both charts:
6. Move the mouse cursor into the chart and then hold down the mouse button
7. Drag the new chart to a new position on the right of the screen
8. Drag the old chart to the left, so you can compare the two, then <Delete> it
Next, try deleting and adding some data:
9. Click on cell A2 then right click and choose Delete… - press <Enter> for [OK] to Shift cells up – only 10
values are plotted and the horizontal axis changes accordingly
10. Select cells A4 to A6 then right click and choose Insert…
11. Choose Shift cells down then press <Enter> for [OK] - three new (zero) values are added to the chart
12. Press <Ctrl z> to [Undo] the last command and remove the new values
13. Click on cell A11 and, using the cell handle, drag down to cell A14 to add three extra values – this time,
the new values are not added to the chart
2
14. Press <Ctrl z> to [Undo] the last command and remove the new values
This last exercise demonstrated that Excel knows which cells contain the cell range being plotted and that
only changes made within that range are reflected in the chart.
Next, try adding a second set of data:
15. Click on cell B1 and type yyy (press <Enter>)
16. In cells B2 to B11 type the values 10 to 1 in reverse order
17. Drag through cells B1 to B11 then right click and Copy them
18. Right click on the chart background (near the edge) and Paste in the new values
You’ll find that the horizontal axis is still labelled 1 to 10 but that a second column has been added to each
division and that a new yyy label has been added to the legend. Another change is that the chart title has
disappeared (and will have to be added manually).
19. Repeat step 18 and you’ll find that a third column appears – a second set of yyy values
20. Press <Ctrl z> to [Undo] the last action – you don’t need these but it’s useful to know that you can
plot the same data twice (as you’ll see later)
3
An equivalent dialog box appears for all the other elements too, with similar options from which you can
choose. In fact the options for any area (eg the Plot Area) are exactly the same. If you use the Drawing Tools,
the instructions which follow should be very familiar to you (most are exactly the same). Starting with Fill:
2. Drag the dialog box to the left so you can see most or all of the chart
3. Change the fill option to Solid fill – the areas are coloured blue and further options appear
4. Click on Color and select a different Standard color – your can access More colors… if necessary
5. Use the sliding Transparency scale to make the colour more/less intense – note that the cell gridlines
show through (they wouldn’t if the chart was on its own chart sheet)
6. Change the fill option to Gradient fill – a different set of options appear
7. Try changing the Preset colors:, Type: and Direction: - the Gradient Stops settings let you change the
width, colour and transparency of any multi-band fill
8. Change the fill option to Picture or texture fill – here you can use any clip or your own picture for the
chart area, or a pre-defined texture
9. Click on Texture: and explore what’s provided
10. Explore the Tiling options which let you move the texture around and rescale it
11. Turn off Tile picture as texture and the tiling options become stretch options
12. End this section by changing the fill option back to Automatic
Next, look at the Border Color and Style. Again, these settings can be applied to any line (eg an axis).
13. Click on Border Color on the left of the Format Chart Area dialog box – the options change as below:
14. Solid line is very similar to the Solid fill you saw earlier, and Gradient line matches Gradient fill
15. End by setting the border colour back to Automatic (if you have made any changes)
16. Click on Border Styles on the left of the Format Chart Area dialog box – the following options appear:
17. Experiment by changing the Width:, Compound type: and Dash type:
18. The Cap type:, Join type: and Arrow settings aren’t really applicable here, but try Rounded corners
The other settings (Shadow and 3-D Format) also don’t really apply here, so:
19. Press <Esc> to [Close] the Format Chart Area dialog box
20. Press <Ctrl z> to [Undo] any changes you don’t like
4
Axis Settings
Next, look at the axis settings:
1. Click on [Chart Elements] and choose Horizontal (Category) Axis then on [Format Selection]
Three new sets of options appear, Axis Options, Number and Alignment.
Starting with the Axis Options:
2. The Interval between tick marks affects the number of little lines
denoting the divisions – there’s no need to change this here
3. Under Interval between labels: set Specify interval unit: to 2 -
click on another option and the axis is now labelled 1, 3, 5 …
4. Turn on Categories in reverse order – the series swap places
and the axis is labelled 9, 7, 5 … (the other moves to the right)
5. Vertical axis crosses: lets you move the vertical axis so that it
crosses at a value other than 0 – try At maximum category
6. Try At category number and set a value then reset Vertical axis
crosses: to Automatic and turn off Categories in reverse order
The other options aren’t so useful. Label distance from axis: moves the
labels closer to or further away from the axis. Axis Type: has no effect
here (but you might need it for dates). Major/Minor tick mark type: lets
you position the tick marks relative to the axis. Axis labels: lets you
move the labels away from the axis or hide them completely (None)
The Position Axis: option On tick marks isn’t particularly useful either, but would allow you to label a single set
of columns with the axis label against each column (currently the columns are in the centre of each division).
7. Click on Number on the left of the Format Axis dialog box to see the options here – these let you set
the number of decimal places etc, just like formatting inside a cell
8. Click on Alignment on the left of the Format Axis dialog box – here you can change the direction of the
labels to read up/down or, indeed, at any angle between these settings
9. Press <Esc> to [Close] the Format Axis dialog box
Moving to the vertical (y- or value) axis:
10. Click on [Chart Elements] and choose Vertical (Value) Axis then on [Format Selection]
The options here are the same as before except for the Axis Options.
These are significantly different because the values aren’t fixed by
Excel but are determined by the data. To change the settings:
11. For Maximum: click on Fixed and set this to 10
12. For Major unit: click on Fixed and set this to 2
13. For Minor unit: click on Fixed and set this to 1
To see the effect of fixing the minor units:
14. Change Minor tick mark type: from None to Outside
Tick marks should now appear at values of 1, 3, 5 etc
15. Press <Esc> to [Close] the Format Axis dialog box
16. Next, change the data value in B7 to 15 – the chart shows it as 10 (the maximum axis value)
17. Click on the chart, move to the Chart Tools Format tab and repeat step 10
18. Repeat step 11 setting Maximum back to Auto to cater for any larger values automatically
19. Press <Enter> to [Close] the Format Axis dialog box, then reset the data value in B7 to 5
5
Next have a look at the options associated with the data:
1. Click on the chart then move to the Format tab and click on [Chart Elements]
2. Choose Series “xxx” then on [Format Selection] – the Format Data Series dialog box appears:
3. Set Series Overlap to Overlapped (100%) and the two columns are drawn on top of each other
4. Set Series Overlap to Separated (-100%) and the columns are separated by a gap
5. Set Gap Width: to Large Gap (500%) and the columns become very thin
6. Set Gap Width: to No Gap (0%) and the columns again touch each other
7. Set Series Overlap to 0% (you can also type in values) and the columns completely fill the axis
8. Finally, set Plot Series On to Secondary Axis – a second axis (0 to 12) appears on the right and the one
set of columns is partly hidden by the other (but you could change the transparency to see the values)
9. Set Gap Width: back to 150% and reset Plot Series On to Primary Axis
10. Press <Esc> to [Close] the Format Data Series dialog box
As well as being able to format a whole data series, you can also do the same with a single data point:
11. Use the <right_arrow> key to move along the series to a particular point (you could also click on it
with the mouse) – the handles are now showing on just the one column
12. Click on [Format Selection] to display the Format Data Point dialog box
13. View the Fill options and change the colour of the column by choosing Solid fill and a Color
14. [Close] the Format Data Series dialog box then press <Ctrl z> to [Undo] the colour change
The final element which you’ve yet to explore is the set of gridlines:
1. Click on [Chart Elements] and choose Vertical (Value) Axis Major Gridlines
2. Click on [Format Selection] – the Format Major Gridlines dialog box appears
3. Move to the Line Style options and change Dash type: to a dashed line
4. Press <Esc> to [Close] the Format Major Gridlines dialog box
5. Press <Delete> and the gridlines disappear - press <Ctrl z> to [Undo] the deletion
There are other elements, not present on this particular chart, which will be looked at later.
You’ve already looked at the buttons in the first, Current Selection, group. The other groups are identical to
the Drawing Tools Format tab. The next group, Shape Styles, is essentially another way to format a shape
(instead of using the [Format Selection] button). You may prefer using these buttons instead:
6
1. Click on any area element of the chart (the Plot Area is probably best)
2. Next, click on the list arrow at the foot of the scroll bar on the right of the [Style] (Abc) buttons
3. Move the mouse cursor around the styles – the element changes to match the current selection
4. If you have chosen a style, press <Ctrl z> to [Undo] it
If you want to set your own style, you do so using the three buttons to the right:
5. Click on the words [Shape Fill] and explore what’s available – there’s no need to change anything
6. Next, do the same with the [Shape Outline] button
7. Finally, try out the [Shape Effects] button – here you can also set a Glow, Soft Edges etc
8. If you have made any changes, press <Ctrl z> to [Undo] them
The buttons in the WordArt Styles group are all greyed out, as you aren’t using any WordArt here. Similarly,
the Arrange group is largely irrelevant here (if you had two or more charts overlapping then you could use
the buttons here to bring one to the front or send it backward). The final group is Size:
9. Use the [Shape Height] and [Shape Width] buttons to set the exact size of the chart
10. Click on the group arrow on the right of the Size group to display the Size and Properties dialog box
11. Move to the Properties tab and note the Object Positioning – the default is to Move and size with cells
12. Press <Esc> to [Close] the Size and Properties dialog box
13. Finally, right click on the column M heading (or any of those behind the chart) and choose Delete – the
chart becomes narrower – press <Ctrl z> to [Undo] the column deletion
To stop this happening, the Object Positioning (step 11) needs setting to Move but don’t size with cells.
8
Next, have a look at what changes you can make to the gridlines:
1. Click on the [Gridlines] button, choose Primary Horizontal Gridlines then None – the lines disappear
2. Repeat step 1 but choose Primary Vertical Gridlines then Major Gridlines – vertical lines appear
3. Press <Ctrl z> twice to undo the changes to the gridlines
Note that you can also display the Format Gridlines dialog box (seen earlier) by choosing More Gridline
Options…. The major and minor gridlines can be formatted separately by selecting them before issuing the
command. Single gridlines cannot be formatted differently from the rest.
The third extra tab which appears when you create a chart is the Design tab. Here you can choose a different
sort of chart and can make use of built-in styles. You can also move a chart onto its own chart sheet:
1. First, click on the chart then on the Design tab to view the available buttons
2. This time, start on the far right – click on the [Move Chart] button – a dialog box appears:
3. Choose New Sheet and change the name from Chart1 to My Chart – press <Enter> for [OK]
Your chart is moved to a separate sheet, filling the whole screen, which makes it much easier to see what’s
going on.
10
The Type Group
Moving back to the left of the Ribbon, the Type group has buttons to change the chart type. This lets you
change the type if you selected the wrong type when you first created the chart.
1. Click on the [Change Chart Type] button – the following dialog box appears:
2. Choose the [3-D Column] chart – the one in the top row on the far right (press <Enter> for [OK])
3. Move to the Layout tab and click on the [Chart Elements] on the far left – note how the list has grown
4. Note in the Background group that the [Chart Wall], [Chart Floor] and [3-D Rotation] buttons are
now active – click on [3-D Rotation] and, under Rotation, change x: and y: to rotate the chart
5. Investigate some of the other options, if you like, then press <Esc> to [Close] the dialog box
6. Move back to the Design tab and repeat steps 1 and 2, this time choosing [Line with Markers] (fourth
in the set of Line charts) – press <Enter> for [OK]
Not all chart types are suitable for all types of data, as you’ll see next:
7. Click on the [Change Chart Type] button and choose [Pie] (the first in the Pie group) and click on
[OK] – you’ll find that a pie chart can only plot one data series at a time
8. Also, in the Pie group, repeat step 6 and choose [Exploded Pie] (the fourth) – the pie slices separate
9. Move the mouse cursor over any slice and, holding the mouse button down, drag the slice in as far as
you can – all the slices come together again.
10. Click on any slice (to select that slice) and drag it outwards – each slice can be exploded individually
11. Click away from the slice (in the background) then [Change Chart Type] to [Bubble] – click on [OK]
The bubbles are drawn too large; to resize them:
12. Right click on any of the bubbles and choose Format Data Series…
13. Change Scale bubble size to: 15 –press <Enter> for [Close]
There isn’t time to discuss in detail all the different chart types/subtypes here, but you’re welcome to do so.
Combination Charts
Excel lets you combine certain chart types onto a single chart – for example you could have both a column
and a line. To demonstrate this, start with a new chart:
1. Move back to the data – click on Sheet 1
2. Select cells A1 to A11 then move to the Insert tab and click on [Line] in the Chart group – note that
you can choose the Chart Type here (you don’t have to do so on the Chart Tools Design tab)
3. Choose [Stacked Line] (the second in the top row) - a chart appears, as before
4. Next, right click on the data (A1 to A11 should still be selected) and Copy it
5. Right click on the chart and Paste in a second set of xxx values – the line adds the new values to the old
11
6. Right click on the top line, to select it, and choose Change Series Chart Type…
7. Select [Clustered Column] (the first one in the Column group) then press <Enter> for [OK]
You now have a combination chart. The line isn’t a trendline. To prove this:
8. Change the data in cell A2 to 0 – press <Enter> to plot the new value (the line is no longer straight)
X-Y Charts
In all the charts you have seen so far, the horizontal (x-) axis isn’t actively used. It has been simply numbered
1to 10, which essentially indicates the data row in the data set (ie data values in A2 and B2 are in row 1). If you
want to plot one set of data values against another, then you MUST use an X-Y (Scatter) Chart:
1. First, select your data – here select A1 to B11
2. Move to the Insert tab, click on the [Scatter] button and choose Scatter with only Markers (the first)
The new graph only plots the yyy values – the xxx values are used to position them along the horizontal axis.
Note the gap between the first two points and also how the points are plotted at their exact position on the
horizontal axis.
3. Change the value in cell A11 to 11 – the last point moves further along the axis
4. Select the yyy series again (drag through cells B1 to B11), right click on the selection and Copy the data
5. Right click on the chart and Paste in a second set of y-values (these are plotted on top of the first)
6. Right click on any of the new values and choose Change Series Chart Type…
7. Choose [Clustered Column], as before, then press <Enter> for [OK]
You’ll find that the columns don’t all appear where you want them – they aren’t making use of the horizontal
axis. Here, you can’t create the combination chart you might have hoped for.
8. Press <Ctrl z> to [Undo] the chart type change
9. Right click on any of the new values and choose Format Data Series…
10. Set Plot Series On to Secondary Axis – press <Enter> for [Close]
11. Right click on the new axis on the right and choose Format Axis…
12. Under Axis Options, change Maximum: to a Fixed value of 100 then press <Enter> for [Close]
This last exercise shows you the value of a secondary axis – if you have two series with different scales of
numbers (eg one set with values up to 10 and another with values up to 1000) then you can plot them on
the same graph by making use of a second axis. Here, you don’t need the duplicate series so:
13. Click on any of the new values (to select the series) then <Delete> them
Next, try adding some error bars:
14. Move to the Layout tab, click on [Error Bars] and choose Error Bars with Standard Error –both
horizontal and vertical error bars appear
15. Click on any of the horizontal bars and <Delete> it (you’ll find they all disappear)
Templates
The second button in the Type group on the Chart Tools Design Tab is Save as Template. This lets you set up
the exact style of chart you want for a set of charts, which can then be used for all of them. To see this:
1. Right click on the Chart Area of the current chart and Format Chart Area…
2. Choose a Fill (Solid, Gradient or Picture) then press <Esc> for [Close]
3. Right click on the Chart Title and change the [Font Colour] and [Font Size]
4. Now, move to the Design tab and click on [Save as Template]
5. Give the template a name (eg My Template) then press <Enter> for [Save] – note that is goes into
a special folder and that this is not retained on the IT Services lab PCs (it would be on your own)
12
6. <Delete> the Scatter chart and click on the Combination Chart to select it
7. Now, click on the [Change Chart Type] button, choose Templates then select My Template – press
<Enter> for [OK] – your chart area and title should now match the Scatter chart
2. In Legend Entries (Series) on the left, select the lower xxx then [Remove] it
3. With the Select Data Source dialog box still open, click on [Edit] – another dialog box appears:
4. Click in the empty Series X values: box then drag through cells C1 to C11
5. Note the change to the chart then [Cancel] the new X series
6. Now click on [Add] – the Edit Series dialog box again appears
7. Click on cell B1 to set the Series name: to =Sheet1!$B$1 a
8. Move to the Series Y values: and <Delete> the current setting
9. Now drag through cells B2 to B11 to set this to =Sheet1!$B$2:$B$11 - press <Enter> for [OK]
10. Note the change to the chart then [Remove] the new yyy values - press <Enter> for [OK]
11. Finally, click on [Switch Row/Column] – the graph goes crazy (press <Ctrl z> for [Undo])
The Switch Row/Column button does have its uses. If your data was typed in across the columns (instead of
down the rows) then you would be making use of it. By default, Excel expects your data to be in rows.
Chart Layouts
Excel provides you with some pre-defined popular layouts which, if you know them, can make it very easy to
get various extra chart elements for free.
13
1. Click on each of the 3 buttons shown in the Chart Layouts group to see their effect
2. Now click on the [More] arrow at the bottom of the Chart Layout scroll bar to see further layouts
3. Try some of these – Layout 9, for example, supposedly gives you a trendline and regression statistics
Chart Styles
The final group on the Chart Tools Design toolbar is called Styles. Again, these are pre-defined styles which
help make colouring your chart simple and which give a very professional look:
1. Click on some of the buttons provided in the Chart Styles group to see their effect
2. Now click on the [More] arrow at the bottom of the Chart Styles scroll bar to see further styles
3. Try some of these – the ones with a black background look spectacular
4. Click on the [Change Chart Type] button and select a [Pie] chart – press [Enter] for [OK]
If there is a particular style you like but would also like to keep your own formatting, you can:
5. Apply your own template – click on [Change Chart Type] then select My Template
6. Right click on the preferred [Chart Style] then choose Apply and Maintain Formatting – your Chart
Area and Title settings should be preserved but other elements will change to reflect the chosen style
7. Right click on the [Chart Style] again and choose Apply and Clear Formatting – your settings are now
lost
Themes
The default chart colours used in Excel 2007 are the accent colours from the current theme. To change the
colours:
1. Start by changing the [Chart Style] to a multicoloured pie chart (so you can see all the colours)
2. Move to the Page Layout tab and click on the [Themes] button
3. Move the mouse cursor over the themes and watch how the pie slices change colour and effect
4. Choose the theme you like best then click on the [Colors] button to change that theme’s colours
To see how the colours in the theme are defined:
5. Click on the [Colors] button again but choose Create New Theme Colors… - a dialog box appears:
14
You’re creating your own theme colours here, which you can name if you like:
6. Type my theme to replace Custom 11 as the Name:
7. Next, change the theme colour you don’t like – the Accent colours are used for the area colours
Note that the colours are repeated so that Accent 1 controls the colour of pie slices 1 and 7.
8. Repeat step 7 for any other theme colours you want to change
9. Click on [Save] to save your theme
You’ve finished exploring charts now, so:
10. Close down Excel, as usual – there no need to save your file, unless you want to
Other Information
Copying Charts from Excel into Word
If you want to copy a chart from Excel into a Word document, then the best advice is to use Paste Special and
paste the chart in as a Picture. If you hadn’t done so already, make sure your chart in Excel is on a Chart Sheet
so that the resolution is at a maximum. If you resize the chart in Word, you’ll find that there are no problems.
The one disadvantage is that the chart is now a picture and cannot be activated from Word. You need to take
a note of which Excel file relates to each picture, in case you ever need to make any changes (which must be
carried out on the original in Excel and then copied and pasted back into Word).
Pattern Fill
You may well want to use Pattern Fill to add shading to your charts (especially if you are printing them in
black and white). This would allow you to use cross-hatching, bars etc to distinguish between areas (columns,
bars etc). Sadly, this feature was dropped from Excel 2007 but can be accessed via an Add-In. This adds a new
group to both the Chart Tools Layout and Format tabs.
The Add-In can be downloaded from http://www.andypope.info/charts/patternfills.htm.