Adding Sparklines
- Select an empty cell or group of empty cells in which you want to insert one or more sparklines.
- On the Insert tab, in the Sparklines group, click the type of sparkline that you want to create: Line, Column, or Win/Loss.
- In the Data box, type the range of the cells that contain the data on which you want to base the sparklines.
Note: You can click to temporarily collapse the dialog box, select the range of cells that you want on the worksheet, and then click to restore the dialog box to its normal size.
About the Sparkline Tools Tab
When one or more sparklines are selected, the Sparkline Tools appear, displaying the Design tab. On the Design tab, you can choose one or more of several commands from among the following groups: Sparkline, Type, Show/Hide, Style, and Group.
Use these commands to create a new sparkline, change its type, format it, show or hide data points on a line sparkline, or format the vertical axis in a sparkline group. These options are described in detail in the following section.
Editing Sparkline Data
Control which value points are shown
You can highlight individual data markers (values) in a line sparkline by making some or all of the markers visible.
In this sparklines, the high-value marker is green, and the low-value marker is orange. All other markers are shown in black.
- To show all values, select the Markers check box.
- To show negative values, select the Negative Points check box.
- To show the highest or the lowest values, select the High Point or Low Point checkboxes.
- To show the first or the last values, select the First Point or Last Point checkboxes.
Change the style of or format sparklines
Use the Style gallery on the Design tab, which becomes available when you select a cell that contains a sparkline.
- Select a single sparkline or a sparkline group.
- To apply a predefined style, on the Design tab, in the Style group, click a style or click the arrow at the lower right corner of the box to see additional styles.
- To apply specific formatting to a sparkline, use the Sparkline Color or the Marker Color commands.
Show or hide data markers
On a sparkline that has the Line style, you can show data markers so that you can highlight individual values.
- Select a sparkline.
- In the Show/Hide group, on the Design tab, select any of the checkboxes to show individual markers (such as high, low, negative, first, or last), or select the Markers checkbox to show all markers.
Show and customize axis settings
- You can select Date Axis Type (in the Group group, click Axis) to format the shape of the chart in a sparkline to reflect any irregular time periods in the underlying data.
- In a line sparkline, applying the Date Axis type can change the slope of a plotted line and the position of its data points in relation to each other.
- In a column sparkline, applying the Data Axis type can change the width of, and increase or decrease the distance between the columns.
You can also use these Axis options to set minimum and maximum values for the vertical axis of a sparkline or sparkline group. Setting these values explicitly helps you control the scale so that the relationship between values is shown in a more meaningful way.
- With the sparkline or sparkline group selected, in the Group group, click Axis.
- Under Vertical Axis Minimum Value Options or Vertical Axis Maximum Value Options, click Custom Value.
- Set minimum or maximum values that you feel will best emphasize the values in the sparklines.
You can also use the Plot Data Right-to-Left option to change the direction in which data is plotted in a sparkline or sparkline group.
- With the sparkline or sparkline group selected, in the Group group, click Axis.
- Under Horizontal Axis Options, click Show Axis. Any sparklines that contain negative data will display a horizontal axis at 0.
Handle empty cells or zero values
You can control how a sparkline handles empty cells in a range (and thus how the sparkline is displayed) by using the Hidden and Empty Cell Settings dialog box.