Sub topic 17
Fixing common chart problems
This chapter assumes you can insert a chart, open the chart editor, and read the Setup and Customize tabs. It also assumes you know how data range, headers, and series relate to each other. Most chart problems come from three places: how the source data is laid out, how the chart editor interprets that data, and how the axis is told to treat the values. Work through them in that order.
A diagnostic routine
Before changing settings at random, check the chart against its source data. The order below finds most faults quickly.
- Click the chart, open the chart editor, and look at the Data range box on the Setup tab.
- Check the three options under the range: Switch rows/columns, Use row 1 as headers, and Use column A as labels.
- Check the X-axis and Series lists. Each series should be one column (or row) of numbers.
- Check that every value in the series is a real number, not text.
- Only then open the Customize tab and check axis scale and formatting.
Wrongly detected headers
Sheets guesses whether your first row or first column holds labels. It looks at the data types. If your first row contains numbers, such as years used as column headings (2023, 2024, 2025), Sheets can treat them as data and plot them as a series. The chart then shows a series called "Series 1" or a line for the years themselves.
Fix this in the chart editor:
- Tick or untick Use row 1 as headers so the top row is treated as series names (or as data).
- Tick or untick Use column A as labels so the first column supplies the category labels on the x-axis.
- If the years are numeric and still get plotted as a series, convert them to text, for example by entering them as
'2023or formatting the cells as Plain text, then re-enter them.
A common symptom of a header problem is a legend that reads "Series 1, Series 2" instead of your names. Another is a category axis that shows 1, 2, 3 instead of month names.
Swapped rows and columns
If you wanted one line per product but got one line per month, the chart has rows and columns the wrong way round. Sheets decides which direction holds the series, usually by taking the longer dimension as the categories. When your table is nearly square, or has more series than categories, that guess can be wrong.
Tick Switch rows/columns on the Setup tab. The series and the x-axis labels trade places. If the result is still wrong, check that the range includes the header row and label column, because a range that starts one cell too low or too far right also causes odd results.
The range misses data or includes too much
Typical causes:
- New rows are not included. A fixed range such as
A1:C13does not grow when you add row 14. Extend the range by editing it, or chart a larger range such asA1:C100. Blank rows at the end then appear as empty categories, so a better option is to put a table, a QUERY, or a named range behind the chart. Unwanted blank categories can also be hidden by filtering the data. - A total row is plotted. If the table ends with a Total row, the chart treats it as another category and the axis is dominated by one huge value. Exclude that row from the range.
- A non-contiguous range is mis-ordered. Separate ranges can be entered with commas in the data range box (for example
A1:A13, C1:C13). They must be the same length, or the series will not line up with the labels.
Numbers stored as text
Sheets only plots values that it recognises as numbers. A column of text numbers is plotted as zeros or ignored. Signs of the problem:
- The values are left-aligned in the cells (numbers are right-aligned by default).
- A column of values appears as a series, but every point is zero.
- A pie chart shows no slices.
=ISNUMBER(C2)returnsFALSE.
Typical sources are imported CSV files, values with currency symbols or trailing spaces, and copy-paste from web pages. To convert a column in a helper range, use a formula:
=ARRAYFORMULA(IF(C2:C="", "", VALUE(SUBSTITUTE(TRIM(C2:C), "$", ""))))Chart the helper column instead of the original. For a quick check, =COUNT(C2:C100) counts only numbers and =COUNTA(C2:C100) counts every non-empty cell. If the two numbers differ, some values are text.
Dates have the same problem. If dates are text, a line or column chart treats them as separate labels, in the order they appear, with equal spacing. Real dates allow a continuous time axis, so gaps between dates show as gaps on the axis.
Dates and the axis type
On the Customize tab, under Horizontal axis, the Treat labels as text option controls how the x-axis is spaced. When it is off and the labels are real dates, Sheets spaces points by time. When it is on, each label gets equal spacing.
- If irregular dates (for example 1 Jan, 2 Jan, 15 Feb) look evenly spaced, the labels are being treated as text. Turn the option off, and make sure the cells contain real dates.
- If you want one column per category and the chart shows a continuous timeline with thin bars, turn the option on.
Blank cells and gaps
Empty cells in a series create gaps in a line chart. Zeros plot as zero, which drags a line down. Neither is wrong, but the effect can mislead. Decide what a blank should mean: not measured (leave it empty) or none (enter 0). Where the data comes from a formula, "" is text, and it can plot as a zero or a break depending on the chart type. Use NA() to produce a true gap in a formula-driven series, and be aware that it displays #N/A in the cell, so keep it in a helper column.
Hidden and filtered data
By default, charts leave out hidden rows and columns and rows removed by a filter. This is useful when you want a chart to follow a filter. It is confusing when the chart seems to lose a series. In the chart editor, under Setup, look for the Plot hidden/filtered data option (in some versions labelled under the data range section) to include them. If a series or category has disappeared, check for a hidden row or column or an active filter on the sheet.
Axis scale surprises
| Symptom | Likely cause | Fix |
|---|---|---|
| Differences look dramatic | The vertical axis starts above zero | Set the minimum to 0 in Customize, Vertical axis |
| One tall bar flattens the others | An outlier or total row dominates | Remove the outlier, or use a logarithmic scale if values span orders of magnitude |
| A second series is flat near zero | The series uses a different scale from the first | Move it to a secondary axis, as in a combo chart |
| Axis labels are crowded or skipped | Too many categories for the width | Enlarge the chart, rotate the labels, or reduce categories |
| Values shown as 0.25 instead of 25% | Number format not applied | Set the axis or label number format to percent |
Remember that a log scale cannot show zero or negative values.
Chart type surprises
Sheets sometimes suggests a chart type that does not fit. A few well-known cases:
- A pie chart shows only one series, so extra columns in the range are ignored.
- A pie chart with negative values cannot draw them.
- A scatter chart uses the first column as the x-values, so text labels there produce nonsense. Use a line or column chart for categories.
- A stacked chart with a Total series double counts, because the total stacks on top of its parts. Remove the Total series.
Charts that do not update
If a chart does not change when the data does, check whether the cells you edited are inside the chart's range. Then check whether they are hidden or filtered. If the data comes from IMPORTRANGE or another formula, confirm the formula has finished loading and is not showing an error. For charts pasted into Docs or Slides, the link must be refreshed there, using the Update button on the chart. A chart published to the web can take some minutes to reflect changes.
A worked repair
Suppose a sheet holds these values, imported from a CSV:
| A (Month) | B (Sales) | C (Target) |
|---|---|---|
| Jan | $1,200 | 1500 |
| Feb | $1,350 | 1500 |
| Mar | $1,100 | 1500 |
The chart shows only the Target line, and the legend says "Series 1".
=COUNT(B2:B4)returns 0, so Sales are text. Add a helper column D with=VALUE(SUBSTITUTE(SUBSTITUTE(B2, "$", ""), ",", ""))and fill it down.- Change the chart range to
A1:A4, C1:D4, putting the labels, Target, and the cleaned Sales together. Give D1 the header "Sales (clean)". - Confirm Use row 1 as headers and Use column A as labels are ticked. The legend now shows the real names.
- Open Customize, Vertical axis, and set the minimum to 0 so the gap between sales and target is not exaggerated.
Exercise
A line chart of monthly revenue shows the months as 1, 2, 3 on the x-axis, and the legend lists "Series 1" and "Series 2". The data has a header row and a month column. Which two options on the Setup tab do you check first, and what do you do if the chart then shows one line per month instead of one line per product?
Show answer
Check "Use row 1 as headers" and "Use column A as labels", and tick them so the header row supplies series names and the first column supplies the x-axis labels. If the chart shows one line per month, the rows and columns are swapped, so tick "Switch rows/columns".
Exercise
Every point in your Sales series plots as zero, although the cells show numbers. The values are left-aligned. How do you confirm the cause, and how do you repair it without retyping the data?
Show answer
Compare =COUNT(range) with =COUNTA(range). If COUNT is lower, some values are text. Create a helper column with =ARRAYFORMULA(VALUE(SUBSTITUTE(TRIM(range), "$", ""))), adjusted for the symbols present, and point the chart at the helper column.