Charts and sparklines
Insert and recommend charts from 17 types, format titles, axes, legends, series, trendlines and error bars, move and resize charts, and add sparklines in cells.
A chart draws the values of cells as a picture that updates when the values change. Sparklines are tiny charts inside cells, one per row. For charts built on a PivotTable, see PivotCharts.
Insert a chart
- Select the data, including its headings. If you select a single cell, all the data on the sheet is used.
- Open Insert › Charts › Chart and choose a type.
The chart is placed to the right of the data and selected, and the Chart tab appears. The status bar says what was added, for example Added a column chart of 3 series.
How the data is read
- If any cell in the first row is text, the first row holds the series names.
- If the first data cell in the first column is text, the first column holds the category labels.
- Every other column is a series.
Some types show one series only: Pie, Doughnut, Histogram, Pareto, Waterfall, Funnel and Treemap. For these, only the first series is used, and the status bar says Added a … chart of the first series. A Bubble chart uses the second numeric column as the size of each bubble. A Waterfall chart treats its last value as the total.
| Message | What to do |
|---|---|
| Select the cells to chart first. | Select some data. |
| A chart needs more than one cell. Select the data first. | Select a block of cells. |
| That selection is all headings — nothing to plot. | Include the rows of values. |
| That selection has labels but no numbers to plot. | Include a column of numbers. |
Chart types
The Chart menu lists these types, in groups:
| Group | Types |
|---|---|
| Column and bar | Column, Bar |
| Line and area | Line, Area |
| Pie and doughnut | Pie, Doughnut, Sunburst |
| X Y | Scatter, Bubble |
| Statistic | Histogram, Pareto, Box & Whisker |
| Waterfall and funnel | Waterfall, Funnel, Stock |
| Hierarchy and radar | Treemap, Radar |
Recommended charts
- Select the data.
- Click the sparkle button in Insert › Charts (Recommended chart — picks the type that suits the shape of the selection).
- In Recommended charts, look through the suggestions, best fit first. Each shows a preview drawn from your data, the type, and a sentence explaining why it suits this data — for example, that the labels read as dates, so a line shows change over time.
- Click a suggestion to insert it, or click Cancel.
The suggestions are based on the shape of the data: one column of many readings suggests a histogram, a few positive parts suggest a pie, labels that read as months or years suggest a line, two columns of numbers without labels suggest a scatter, and many categories suggest horizontal bars. A column chart is always offered.
Select, move and resize a chart
- Select: click the chart. Round handles appear on its corners and edges, and the Chart tab appears.
- Move: drag the chart. Hold Alt as you release to line its top-left corner up with the cell grid.
- Resize: drag a handle.
- Nudge: press the arrow keys to move it a little; hold Shift to move it further.
A move or resize is one undo step. Charts move with the cells under them when you insert or delete rows and columns.
Delete a chart
- Click the chart.
- Click the bin in Insert › Charts (Delete the selected chart).
The Chart tab
| Control | What it does |
|---|---|
| Type menu (named after the current type) | Changes the chart type. Changing to a pie or doughnut keeps only the first series. |
| Legend | Places the legend on the Right, Bottom, Top or Left, or None |
| Data labels | Shows or hides the value on each point |
| Title… | Opens Chart title. Type the title and click Apply. |
| Grouping | Clustered, Stacked or 100% stacked — how several series sit together |
Format a chart
- Click the chart.
- Click the settings button in Insert › Charts (Format the selected chart — axis titles, series types, secondary axis, trendlines).
- Change the options in Format chart.
- Click Apply.
Chart options
| Option | What it does |
|---|---|
| Type | The chart type, listed with its group |
| Chart title | The title above the chart |
| Category axis title | The title along the category axis |
| Value axis title | The title along the value axis |
| Secondary axis title | The title of the second value axis. Shown when a series uses it, and for Pareto charts. |
| Bins | For a histogram: the number of bars, from 1 to 40, or Automatic |
| Gridlines | Shows or hides the value gridlines |
| Data labels | Shows or hides the value on each point |
| Legend | None, Right, Bottom, Top or Left |
Series options
Under SERIES, each series is listed by name with its own options.
| Option | What it does |
|---|---|
| Chart type (starts as Same as chart) | Draws this series as Column, Bar, Line, Area, Scatter or Bubble, which makes a combo chart — columns for a count and a line for a rate, say |
| 2nd axis | Plots the series against a second value axis, for values on a different scale |
| Trendline (starts as No trendline) | Adds a Linear, Exponential, Logarithmic, Polynomial, Power or Moving average trendline. Polynomial trendlines are second order and moving averages cover two points. |
| Equation | Shows the trendline’s equation |
| R² | Shows how well the trendline fits |
| Error bars (starts as No error bars) | Adds Fixed value, Percentage, Standard deviation or Standard error bars |
| Value or % | For Fixed value and Percentage: the size of the bars |
| Direction | Both, Plus or Minus |
| Cap | Draws a short line across the end of each bar |
Standard deviation and standard error bars describe the whole series, so every bar in the series is the same length.
Charts follow their data
A chart reads its cells each time it is drawn, so editing a value changes the chart straight away. Series keep their references: inserting rows inside the data extends them, and a chart’s position moves with the cells under it.
Charts in workbooks made in other apps are drawn from their cells too. A chart you don’t change is saved exactly as it was read.
PivotCharts
A PivotChart plots a PivotTable and follows it: adding a field or changing the pivot redraws the chart from the new result.
- Click a cell inside the PivotTable.
- Open Insert › Charts › PivotChart and choose Column, Bar, Line or Pie.
The chart is placed to the right of the PivotTable, with one series per value column and the grand total left out. The status bar says Pivot chart added. It follows the pivot rather than a fixed range.
| Message | What to do |
|---|---|
| Put the cursor in a pivot table first. | Create a PivotTable, or click inside one. |
| This pivot has nothing to plot yet — give it a value field. | Add a field to Values in the field list. |
| This pivot already has a chart. | Each PivotTable can have one PivotChart. |
See PivotTables.
Sparklines
A sparkline is a small chart drawn inside a cell, showing the trend of the values across a row.
Add sparklines
- Select the rows of numbers, with at least two columns. A first column of labels is skipped.
- Click one of the sparkline buttons in Insert › Sparklines: line, column or win/loss (for example Line sparkline — one tiny chart per row of the selection, in the column beside it).
One sparkline is added for each row that has numbers, in the column immediately to the right of the selection. The status bar says, for example, Added 6 line sparklines in column H. A sparkline takes the place of anything shown in its cell.
| Kind | What it shows |
|---|---|
| Line | A line through the values, with the highest and lowest points marked |
| Column | A column per value, with negative values and the axis shown |
| Win/Loss | A block up for each positive value and down for each negative one |
| Message | What to do |
|---|---|
| Select at least two columns of numbers to draw a sparkline from. | Select a wider block. |
| That selection has labels but no numbers. | Include the columns of numbers. |
| No row in that selection has numbers to plot. | Select rows that contain numbers. |
Change sparklines
- Click a cell that holds a sparkline.
- Click the settings button in Insert › Sparklines (Sparkline options). It is unavailable unless the current cell holds a sparkline.
- In the Sparklines dialog, which says how many sparklines are in the group, change the options.
- Click Apply.
| Option | What it does |
|---|---|
| Line, Column, Win/Loss | The kind of sparkline |
| Highest point, Lowest point, First point, Last point | Marks those points |
| Negative points | Marks values below zero |
| Every marker | For line sparklines: a marker on every point |
| Axis | Draws the zero line |
| Same scale for every row | Scales every sparkline in the group to the same range. Off, each row is scaled to its own values, which makes every row look the same shape whatever the numbers. |
The options apply to every sparkline in the group — all the sparklines added together.
Remove sparklines
- Click a cell with a sparkline.
- Open Sparkline options and click Clear.
The whole group is removed and the cells show their contents again. Sparklines are saved in the format Excel uses, so they appear in Excel.
Something unclear or out of date on this page? Tell us.