Creating Charts

By the Syncfusion DevTutorials team · Last updated

Choose and insert column, bar, line, and pie charts, update their data, change their type, and remove them.

A table of numbers gives you the details. A chart shows the story quickly: which month sold best, how costs are changing, or what share each category has. In this lesson, you will learn the four most useful chart types, select data for a chart, insert a chart, update its data, change its type, and remove it.

Open the Excel sandbox and follow along. Charts are on the Insert tab.

Choosing a chart type

ChartBest forExample
ColumnComparing values across categories, with vertical barsSales by month
BarThe same idea, but with horizontal bars; good for long category namesVotes by candidate
LineTrends over timeTemperature across a year
PieParts of a whole, with only a few categoriesShare of a budget

Choose the chart based on the question it answers. “Which is biggest?” → column or bar. “How did it change over time?” → line. “What share of the total?” → pie. A pie chart only works when the slices make one clear whole, and when there are only about six slices or fewer.

Column chart

Column charts use vertical bars, one for each category. The bar height shows the value. This is the most common chart for comparing values.

A chart sits on top of the cells; it is not inside them. Moving or resizing it does not change the data. You can place it beside the table so both are easy to see.

Bar chart

Bar charts use horizontal bars. Use a bar chart instead of a column chart when category names are long, or when you have many categories.

Line chart

Line charts use points joined by a line, usually with time along the bottom. Use them to show rises, falls, and trends.

Pie chart

Pie charts show a circle cut into slices. Each slice is a share of the whole. A pie chart uses one column of numbers.

Select data

A chart comes from a range. Select the data before inserting the chart:

  • Include the labels (like month names) and the numbers, plus the heading row.
  • For a simple chart, use two columns, like A1:B7 (months and sales).
  • For several series, like Sales and Costs side by side, include each number column, like A1:C7.
  • Do not include totals. A “Total” bar would be too large compared with the others.

Insert chart

  1. Select the data, such as A1:B7.
  2. Go to Insert > Chart or use the chart buttons on the Insert tab.
  3. Choose a type, such as Column > Clustered Column.

The chart appears on the sheet. Drag its edge to move it, and drag the corner handles to resize it.

Update chart data

Charts are linked to their data. Change a number in the table, and the chart updates right away.

To include more data, such as a new month, in Excel select the chart and use Chart Design > Select Data, or drag the colored outline around the source range to include the new row. Building charts from a full table with a heading row makes this easier.

Change chart type

Changed your mind? Select the chart, then choose Chart Design > Change Chart Type, or use the chart type button that appears when the chart is selected. Then pick a new type. The data and titles stay the same.

Remove charts

Click the chart’s border to select the whole chart, then press Delete. The data in the cells does not change.

If pressing Delete removes only a title or a single bar, you selected part of the chart, not the whole chart. Click the chart’s outer edge, or an empty area inside it, and then press Delete.

Common mistakes

MistakeWhat happensHow to fix it
Total row included in the rangeOne huge bar squashes the othersReselect the data without the total
No labels selectedCategories show as 1, 2, 3Include the label column when selecting
Pie chart for data that does not add up to a wholeThe chart is misleadingUse a column or bar chart
Line chart for unrelated categoriesThe line suggests a trend that is not thereUse a column chart
Deleting part of the chart instead of the whole chartOnly a title or series disappearsSelect the chart’s border, then delete

Exercise

Click Reset in the sandbox header. Type this table in A1:B5:

  • Month, Sales
  • Jan, 120
  • Feb, 150
  • Mar, 90
  • Apr, 180

Then do each task and press Check.

What to remember

  • Column and bar compare categories; line shows trends; pie shows parts of a whole.
  • Select the data, including headings and labels, then use Insert > Chart.
  • Leave totals out of the chart range.
  • Charts update automatically when their data changes.
  • Change Chart Type switches the chart type; select the chart’s border and press Delete to remove it.

In the next lesson, you will add titles, labels, and legends, and change chart styles and colors.