Bar charts are two-axis charts that show rectangular bars with lengths proportional to the data they represent.
Bar, stacked bar, and 100% stacked bar charts are three of more than a dozen different types of charts you can create in Spreadsheet.com. Adding charts to a workbook gives you another way to visualize your data beyond the spreadsheet grid and can help you identify important statistics and trends in your data that may not be obvious when only looking at numbers.
Introduction to Bar Charts
Bar charts are two-axis charts that show rectangular bars with lengths proportional to the data they represent. Qualitative groups (like months, demographic groups, or product categories) are represented on the y-axis, and quantitative data (like quantities, costs, or expenses) is shown on the x-axis. Bar charts show separate rectangular bars for each quantitative variable.
When used with categorical or nominal variables, bar charts help visualize comparisons between different variables with aggregating functions like sum, count, or average. You may want to use a bar chart to show comparative profits across different quarters, or the number of new users that signed up for a product in different months.
Bar charts and column charts are very similar, but have opposite axes. Where bar charts have a quantitative x-axis and a qualitative y-axis, column charts have a qualitative x-axis and a quantitative y-axis.
How to Create a New Chart
- Click the Insert chart icon in the toolbar, or select Insert > Chart from the workbook menu
- From the Setup portion of the dialog, select your chart type under the "Type" header
Like all other chart types, you can configure your bar charts from the Chart settings panel. The panel will automatically appear when you add a new chart to your workbook, or can be opened by clicking the three-dot icon in the top right corner of an existing chart and selecting “Edit chart” from the dropdown, or by double clicking the chart itself.
The Setup section of the Chart settings dialog allows you to specify the data that will be included in your chart. In the example below, we’ll create a bar chart to show quarterly sales data for three different regions. Let’s take a closer look:
Before selecting your Y-Axis and Series data, you should determine whether the Data series type is “Row based” or “Column based”.
Whether your chart should use Row based or Column based data depends on two things: (1) what you’re trying to visualize and (2) how your data is organized. Column based data allows you to select columns and ranges of values organized into columns as axis and series values for your chart. Row based data allows you to select rows as axis and series values for your chart.
Which data series type should I use?
Let’s take a look at two sample tables, both with the same data showing the number of units sold for three different products during one week. From this data, we want to create a chart organized by Product # with one series for each day of the week.
If our data was organized like the table on the left, where the Product # values are held in a row, we would select Row based data. We could specify our X-axis or Y-axis as the Product # row and select our subsequent series as each of the five rows underneath, one for each day of a week.
If our data was organized like the table on the right, where the Product # values are held in a column, we would select Column based data. We could specify our X-axis or Y-axis as the Product # column and select our subsequent series as each of the five subsequent columns, one for each day of a week.
In the example above, our Y-Axis data is in the form of a column, so we are using column based data.
Once you’ve determined the Data series type, you can select the Y-Axis and Series data. If you previously selected row based, you can select rows from each of the dropdowns. Or, if you previously selected column based, you can select columns from the dropdown. As shown above, you can include multiple series in your chart.
For either selection, you also have the option to specify a range of data to include in the chart as opposed to an entire row or column. By using the range option, you can also select data that’s included on a different sheet than that which the chart is created in.
If you have multiple records for each unique variable in your Y-Axis, you can aggregate the data and combine those records. Here, because we have three different records (months) for each of our quarters, we are aggregating the data. You can select the aggregation function next to each series. Our graph intends to show the total sales per quarter, so we are using the aggregation function sum.
Finally, at the bottom of the dialog, toggle “Use first row as header” (or “Use first column as header” if Row based data is used) to specify whether or not the first row or column of your Series selection should be considered a header row and excluded from the chart data.
If the first row of your selection is the table header row, you do not need to toggle “Use first row as header” as this row will automatically be treated as a header row.
As you select data, your chart will automatically update to reflect your selections, making it easy to check your work as you go and update your selections if necessary. If you make changes to the underlying data, your chart will also reflect those changes automatically.
Once your chart has been set up, you can mouse over each bar and see details about the underlying data.
The Configuration section of the Chart settings dialog allows you to configure the visual appearance of your chart. Let’s take a closer look:
- Chart & axis titles: Assign and format titles for your chart (placed above the chart) and horizontal and vertical axes (places to the left of the chart and below the chart, respectively).
- Series: Change the color assigned to each series of data included in your chart, selected previously in the Setup portion of the Chart settings dialog.
- Legend: Add a series legend to the top, bottom, left, or right of your chart. The legend will inherit the series colors specified previously.
As you change these options, your chart will automatically update to reflect the changes.
Once you've added a title to your chart or labels to your chart axes, you can edit them by double-clicking on the text directly on your chart.
Using Stacked Bar Charts
Like bar charts, stacked bar charts are two-axis charts that show rectangular bars with lengths proportional to the data they represent. In stacked bar charts, all series are stacked across a single rectangular bar.
Above, we’ve transformed the same chart created previously into a stacked bar chart. All of the underlying data is the same, but stacking the bars allows us to see trends in the overall sales data in addition to the sales data from each region.
Using a stacked bar chart can provide insights that may not be immediately apparent from a regular bar chart, like the fact that overall sales across all regions increased every quarter.
Using 100% Stacked Bar Charts
100% stacked bar charts are similar to stacked bar charts, but show each series as a proportion of the whole instead of numerical values. The X-Axis is fixed on a 100% scale and all of the bars are the same length.
Above, we’ve transformed the same chart created previously into a 100% stacked bar chart. All of the underlying data is the same, but the chart is now fixed on a 100% scale and is showing the proportional representation of each series.
Like we found with a stacked bar chart, this chart too can provide new insights, like how sales in Asia gradually made up a larger proportion of our total sales as the year went on.
Learn about managing your existing charts, including how to resize, copy, and download them as standalone images. Or, read on to learn more about additional chart types like column charts, area charts, and line charts.