Stacked Sparklines
To create stacked sparklines in the workbook:
-
Click Insert from the menu.
-
Click Sparkline and select the stacked sparkline under Bar Sparkline from the list.
-
In the Create Sparklines dialog box:
-
Select a range of cells in the same row or the same column.
-
Select the cell where the sparkline will appear.
-
Click OK.
-
-
The sparkline is displayed in the cell. You can now customize the sparkline by clicking Design from the menu and selecting Settings.
-
Set the parameters as described below and click OK.
-
Copy and paste the cell as needed to finalize your stacked sparklines.
Stacked sparkline parameter | Description |
---|---|
Points | Reference that represents the range of cells containing all the values, such as "A1:A4". |
ColorRange | (Optional) Reference that represents the range of cells containing all the colors, such as "B1:B4"; the default value is generated by color. |
LabelRange | (Optional) Reference that represents the range of cells containing all the labels, such as "C1:C4"; the default value is an empty string. |
Maximum | (Optional) Number that represents the maximum value of the sparkline; the default value is the summary of all positive values. |
TargetRed | (Optional) Number that represents the location of the red line; the default value is empty string. |
TargetGreen | (Optional) Number that represents the location of the green line; the default value is empty string. |
TargetBlue | (Optional) Number that represents the location of the blue line; the default value is empty string. |
TargetYellow | (Optional) Number that represents the location of the yellow line; the default value is empty string. |
Color | A string that represents the color for generating colors if colorRange is omitted; the default value is "#646464". |
HighlightPosition | (Optional) Number that represents the index of the highlight area; the default value is an empty string. |
TextOrientation |
Number that represents the orientation of the label text:
|
TextSize | (Optional) Number that represents the size (in px) of the label text; the default value is 10. |
Vertical | (Optional) Boolean that represents whether to display the sparkline vertically. The default value is false. |
The stacked sparkline formula uses the following syntax: =STACKEDSPARKLINE(points, colorRange?, labelRange?, maximum?, targetRed?, targetGreen?, targetBlue?, targetYellow?, color?, highlightPosition?, vertical?, textOrientation?, textSize?) |