In this section, we'll look at how to create a chart from your data, lay it out with the components and arrangement you want, and apply the most useful types of formatting.
To create a chart, you use the commands on the Charts tab of the Ribbon. Follow these steps:
TIP: You can create a chart from either a block range or a range of separate cells. To use separate cells, select them as usual—for example, click the first cell, then Cmd+click each of the others. Make sure that the cells contain comparable data, or the resulting chart will be odd and perhaps deceptive.
NOTE: If the Excel window isn't wide enough to display multiple buttons in the Insert Chart group, a single pop-up button called All appears. Click this button to display a panel that shows all the chart types. You'll need to scroll down the panel to see most of them. When the Excel window is wide enough to display some chart-type buttons, but not all of them, you'll find the missing buttons on the Other pop-up menu.
Excel creates the chart as an embedded chart in the current worksheet, as shown earlier in Figure 7–1. You can then reposition it, resize it, or move it to a chart sheet as follows:
Figure 7–4. To insert a chart, click the appropriate pop-up button in the Charts group on the Insert tab of the Ribbon, then click the chart type you want.
You can change a chart from being embedded in a worksheet to being on its own chart sheet like this:
Chart
Move Chart
from the menu bar to display the Move Chart dialog box (see Figure 7–5).
TIP: You can also display the Move Chart dialog box by Ctrl+clicking or right-clicking the chart and then clicking Move Chart on the context menu.
Figure 7–5. Use the Move Chart dialog box to change a chart from being embedded to being on its own chart sheet.
NOTE: You can also use the Move Chart dialog box to move a chart from a chart sheet to an embedded chart on a worksheet or to move an embedded chart from one worksheet to another.
If you find the chart type you've chosen doesn't work for your data, you can change the chart type easily without having to create the chart again from scratch. Follow these steps:
When Excel displays the chart, you may realize that the data series are in the wrong place; for example, the chart is displaying months by rainfall instead of rainfall by months.
When this happens, there's a quick fix: switch the rows and columns by choosing Charts
Data
Switch Plot
from the Ribbon. Excel displays the chart with the series the other way around.
Sometimes you may find that your chart doesn't work well with the source data you've chosen. For example, you may have selected so much data that the chart is crowded, or you may have missed a vital row or column.
When this happens, you don't need to delete the chart and start again from scratch. Instead, follow these steps:
Charts
Data
Select
from the Ribbon or Chart
Source Data
from the menu bar to display the Select Data Source dialog box (see Figure 7–6).
Figure 7–6. Use the Select Data Source dialog box to change the source data the chart is using.
When you've sorted out the chart type and the source data, it's time to choose the layout for the chart. For each chart type, Excel provides various preset layouts that control where the title, legend, and other elements appear. After applying a layout, you can customize it further as needed.
To apply a layout, click the chart and then click the Charts tab of the Ribbon. If a suitable layout appears in the Layouts box in the Chart Quick Layouts group, click it. To see the full range of layouts, hold the mouse pointer over the Layouts box in the Chart Quick Layouts group until the panel button appears, then click the panel button. On the Quick Layout panel that Excel displays (see Figure 7–7), click the layout you want to apply to the chart.
Figure 7–7. To set the overall layout of chart elements, such as the chart title and legend, open the Layouts panel, then click the layout you want.
Sometimes you may find you need to add to a chart a data series that doesn't appear in the chart's source data—for example, to add projections of future success to your current data.
To add a data series, work from the Select Data Source dialog box. Follow these steps:
Charts
Data
Select
from the Ribbon or Chart
Source Data
from the menu bar to display the Select Data Source dialog box. You can also Ctrl+click or right-click the chart and then click Select Data on the context menu.To control the overall graphical look of a chart, apply one of Excel's styles to it from the Styles box or the Styles panel in the Chart Styles group on the Charts tab of the Ribbon. Click the chart to select it, then click the Charts tab of the Ribbon to display its controls. Either click a style in the Styles box or hold the mouse pointer over the Styles box until the panel button appears, click the panel button to display the Styles panel (see Figure 7–8), then click the style.
Figure 7–8. To give the chart an overall graphical look, apply a style from the Styles box or the Styles panel in the Chart Styles group of the Charts tab of the Ribbon.
To let viewers know what a chart is about, you'll normally want to add a title to it. To do so, follow these steps:
Chart Layout
Labels
Chart Title
from the Ribbon, then choose the title type you want:
TIP: If you need to format the chart title, double-click the chart title to display the Format Title dialog box.
To make clear what the chart shows, you'll usually want to add titles to the axes. To do so, follow these steps:
Chart Layout
Labels
Axis Titles
Horizontal Axis Title
Title Below Axis
from the Ribbon to insert a title placeholder for the horizontal axis.Chart Layout
Primary Vertical Axis Title
from the Ribbon, then click the placement you want:
NOTE: If the chart has a z-axis, you can add the axis title by choosing Chart Layout
Labels
Axis Titles
Depth Axis Title
and then clicking the Rotated Title item, the Vertical Title item, or the Horizontal Title item, as needed.
When you insert a chart, Excel automatically numbers the vertical axis to suit the data range. If you need to change the scale or numbering, follow these steps:
NOTE: You can also open the Format Axis dialog box from the Ribbon. Click the Format tab, go to the Current Selection box, open the pop-up menu, and click Vertical (Value) Axis. Then click the Format Selection button below it. You can also click the vertical axis and choose Format
Axis
from the menu bar or press Cmd+1.
Figure 7–9. You can format an axis to control its values, major and minor units, and whether the chart shows units (such as thousands). Excel applies the changes as you work in the Axis Options category of the Format Axis dialog box.
Figure 7–10. Use the controls in the Ticks pane of the Format Axis dialog box to control how the ticks on the axis appear.
Many charts benefit from having a legend that summarizes the colors used for different data series. You can add a legend by selecting the chart, choosing Chart Layout
Labels
Legend
, then clicking the placement you want: Legend at Right, Legend at Top, Legend at Left, Legend at Bottom, Overlap Legend at Right, or Overlap Legend at Left.
Each of the non-“Overlap” items reduces the chart area to make space for the legend. The two “Overlap” items place the legend on the chart without reducing its size, so they're good for keeping the chart as large as possible.
Whichever placement you use for the legend, you can drag it to a better position as needed. You can also resize the legend by clicking it and then dragging one of the handles that appears around it.
If you need to remove a legend from a chart, either click the legend and then press Delete, or choose Chart Layout
Labels
Legend
No Legend
.
Depending on how the worksheet containing the source data is laid out, you may need to add axis labels that are in separate cells from the chart data. To do this, follow these steps:
Charts
Data
Select
from the Ribbon to display the Select Data Source dialog box.If viewers will need to see the precise value of data points rather than just getting a general idea of their value, add data labels to the chart. To do so, click the chart, then choose Chart Layout
Labels
Data Labels
Value
if you want to show the values. The Data Labels pop-up menu offers different options, depending on the chart type. For example, for pie charts, you can choose the Series Name item, the Category Name item, the Percentage item, or the Category Name and Percentage item.
CAUTION: Use data labels sparingly. Only some charts benefit from data labels—other charts may become too busy, or having the details may distract the audience from the overall thrust of the chart.
When you add data labels to a chart, Excel displays a data label for each data marker. If you want to display only some data labels, delete the ones you don't need. To delete a data label, click it once to select all data labels, then click it again to select just the one label. Then either press Delete or Ctrl+click or right-click the selection and click Delete on the context menu.
On many types of charts, you can choose whether to display horizontal and vertical gridlines to help the viewer judge how the data points relate to each other and to the axes.
To control which gridlines appear, follow these steps:
Chart Layout
Axes
Gridlines
, then click Horizontal Gridlines, Vertical Gridlines, or Depth Gridlines to display the appropriate submenu.TIP: When the viewer needs to see clearly where each value falls, use either data labels or major and minor gridlines. If using minor gridlines (with or without major gridlines) makes the chart look cluttered, use only major gridlines. Normally, it's best not to use both horizontal and vertical minor gridlines, because they tend to make charts look confusingly busy—but sometimes your charts may need them.
Figure 7–11. Using both major and minor gridlines (left) usually makes a chart easier to read than using only minor gridlines (right).
NOTE: To change the values at which the gridlines appear, format the axis, as described in the section “Changing the Scale or Numbering of an Axis” earlier in this chapter.
Some charts look fine with a plain background, but for 3-D charts, you may want to decorate the chart walls (the areas at the back and the side of the chart) and the chart floor (the area at the bottom of the chart). You can add a solid color, a gradient, a picture, or a texture to the walls, the floor, or both. Figure 7–12 shows a chart that uses a picture for the walls.
Figure 7–12. You can give a chart a themed look by applying a picture to the chart walls.
TIP: Usually, the chart walls and floors are the elements that look best with a custom fill (such as a picture). But you can apply a custom fill to many other chart elements as well. To do so, display the Format dialog box for the element, click the Fill category in the left pane, then make your choices.
To format the chart wall or the chart floor, follow these steps:
Chart Layout
Current Selection
Chart Elements
, then click the item you want to format: Back Wall, Floor, Side Wall, or Walls (to format both the back wall and the side wall).Figure 7–13. Use the Fill pane in the Format dialog box to apply a picture fill to objects such as the chart walls or floor.
You can format any of the individual elements of a chart—for example, the legend, the gridlines, or the data labels—by selecting the element and then using its Format dialog box. This dialog box includes the name of the element it affects: the Format Data Labels dialog box, the Format Plot Area dialog box, and so on.
You can display the Format dialog box in either of these ways:
Chart Layout
Current Selection
Chart Elements
or Format
Current Selection
Chart Elements
, then click the element you want on the pop-up menu. You can then click the Format Selection button (also in the Current Selection group) to open the Format dialog box for the element.
The contents of the Format dialog box vary depending on the object you've selected, but for most objects, you'll find categories such as these:
TIP: If the chart element contains text, you can also format it by using the controls on the Home tab of the Ribbon or keyboard shortcuts. For example, to apply boldface to the data labels, click the data labels, then choose Home
Font Bold
(or press Ctrl+B). This is often easier than using the Font pane in the Format dialog box for the element.
3.135.202.203