Sub topic 5
Controlling the Data Range, Headers, and Series
Assume you know how to select cells, enter data, and insert a basic chart. This chapter focuses on the Setup tab in the Google Sheets chart editor. The Setup tab controls which cells the chart reads and how Sheets interprets those cells.
Understanding the data range
A chart data range is the group of cells used to build a chart. For example, A1:C5 includes columns A through C and rows 1 through 5.
A clean chart table usually has:
- One header row that names each column.
- One label column that identifies each category or date.
- One or more numeric columns that contain the values to plot.
- No completely blank rows or columns inside the range.
| Month | Online sales | Store sales |
|---|---|---|
| January | 1200 | 950 |
| February | 1450 | 1020 |
| March | 1380 | 1100 |
In this example, A1:A4 contains category labels. Columns B and C contain two data series. A data series is a related set of values that Sheets plots together.
Changing the range in the chart editor
After selecting a chart, double-click it to open the chart editor. On the Setup tab, use the Data range field to change the cells used by the chart.
You can type a range such as Sheet1!A1:C4, or click the range-selection button and select cells directly. Include the header row if you want Sheets to use the column names as series names.
The Setup tab also provides controls for how Sheets reads the range:
- Use row 1 as headers tells Sheets that the first row contains names, not values.
- Use column A as labels tells Sheets to use the first column for category names.
- Switch rows / columns changes the direction of the chart. Values that were separate series may become categories, and categories may become series.
- Add a series lets you include another value column.
- Remove a series lets you exclude a column without changing the original table.
A wrongly selected range often causes confusing results. For example, selecting B2:C4 excludes the labels and headers. Sheets may then display generic series names and use row numbers as categories.
> callout tip > Keep the source table rectangular. If one series has fewer rows than another, fill missing values consistently or remove those rows from the chart range.
Checking headers and series
If the legend shows names such as “Series 1,” check whether the header row is included and whether Use row 1 as headers is enabled. If dates or names appear as separate series, try Switch rows / columns.
Use the preview in the chart editor after each change. Confirm that:
- The horizontal axis shows the intended labels.
- Each legend entry names the correct series.
- The plotted values match the source cells.
- The header row is not plotted as numeric data.
Exercise
Exercise
A chart uses A1:C5, but the legend says “Series 1” and “Series 2.” What should you check first?
Show answer
Check that row 1 contains the series names, that the range includes row 1, and that Use row 1 as headers is enabled in the Setup tab.