Bar chart reference

How to use and configure bar charts.

A bar chart uses horizontal or vertical bars to show comparisons among categories. The longer the bar, the greater the value it represents. One axis of the chart shows the specific categories (dimensions) being compared, and the other axis represents a discrete value (metric).

In this article:

Bar charts in Data Studio

You can use a bar chart in Data Studio to look at your data in 2 distinct ways, depending on the number of dimensions in the chart. When your chart includes a single dimension, the data series come from your metrics. You can show up to 5 metrics in a single dimensional bar chart.

When a bar charts includes 2 dimensions, the data series come from the second dimension. Two dimensional charts can show any number of data series but only 1 metric.

Either kind of chart can be displayed as a grouped graph, which makes it easy to compare values within a series, or as a stacked graph, which is better at showing the cumulative effect of the series values.

Bar chart example

The bar charts below show 2 different views of Google Analytics web traffic data. The base dimension for both charts is Medium. The left hand chart uses stacked bars to show several metrics (Sessions, Users, and Exits) for medium. The right hand chart uses a second dimension, Country ISO Code, to breakdown each medium according to its country of origin. Instead of stacked bars, this chart use grouped bars: each bar is a data series corresponding to one of the countries. Two dimensional charts can only plot a single metric (Sessions again in this example).

Bar chart examples


Set the default sort

The Sort and Secondary sort options in the chart's DATA properties panel control the default sorting behavior. You can select any metric in the chart's data source, or any dimension currently displayed in the chart, to use as the primary or secondary sorting field.

The Secondary sort option only appears when there is an appropriate combination of dimensions and metrics in the chart.
When specifying a metric as a sort field, you can edit the field's aggregation. For example, you could include a numeric field in the chart as a SUM, but sort on that same field's AVERAGE value.


Bar chart DATA tab properties

Section Property Notes

Dimensions provide the data series for your chart.

  First dimension Serves as the primary data series in the chart. At least 1 dimension is required.
Second dimension (optional) When present, the second dimension serves as a breakdown dimension for the first dimension.

Metrics provide the numeric scale and data series for the chart.

  Metrics 1 through 5 For single-dimensioned charts, you can have up to 5 metrics. Multi-dimensioned charts can have 1 metric. At least 1 metric is required

These properties control the order in which the data series appear in the chart

  Dimension/metric You can sort by the first dimension, or by any of the metrics in the chart
Ascending/Descending Sets the sort order
Default Date Range

The default date range property lets you set a timeframe for an individual chart. Learn more about working with dates and time.

  Auto Use the default date range determined by the chart's data source.
Custom Lets you use the calendar widget to select a custom date range for the chart.

The filter property restricts the data displayed in the component by including or excluding the values you specify. Learn more about the filter property.

  Filter name Click an existing filter to edit it. Mouse over the filter name and click X to delete it.
+Add a filter Creates a new filter for the chart.


Bar chart STYLE tab properties

Section Property Notes
Bar Chart

This section controls the overall appearance and layout of your chart.

  Vertical Displays the data series as vertical bars.
Horizontal Displays the data series as horizontal bars.
Bars Determines the number of data series shown in the chart. If the number of series selected is less than the number of series in your data, only the top N series will be shown (where N equals the number of series you've selected).
Series Determines the number of secondary dimension series shown in the chart. If the number of series selected is less than the number of series in your data, only the top N series will be shown (where N equals the number of series you've selected).
Stacked Bars When checked, the chart displays stacked bars. Otherwise, the chart displays grouped bars.
100% Stacking When checked, stacked charts show the contribution of each data series to 100% of the total value.
Show Data Labels When checked, displays the value for each series in chart.
Color By

This section controls how your data is colored. Learn more about coloring your data.

These options appear when you have a secondary (breakdown) dimension in your chart.
  Single Color
When checked, the data series are displayed in shades of a single color. Otherwise, the chart displays in a veritable rainbow of happy colors (depending on your report theme).

You can change the series colors using the color pickers below.

Series order Use the current theme to color the data according to its position in the chart. This option emphasizes the ranking of the data over the identity of the data.
Dimension value

Colors each dimension value in the chart with the color specified in the dimension value color map. This option ensures that your data uses color consistently, regardless of the position of that data in the chart.


These options determine the placement of the chart legend.

  None No legend appears
Right Legend appears on the right.
Bottom Legend appears on the bottom.
Top Legend appears on the top.
Alignment Sets the alignment of the legend relative to the selected position. 
Max lines Sets the number of lines used by the legend. If the number of series requires more lines, overflow items can be displayed by clicking the < and > arrows.

These options control the display of the chart axes titles and scales. A right Y-axis section appears when you have more than 1 metric in your chart.

Show axes Shows or hides the chart axes.
Reverse Y-Axis direction Controls the vertical display of the Y-axis.
Reverse X-Axis direction Controls the horizontal display of the X-axis.
Show axis title Shows or hides the axis labels. 
Axis min and max Set minimum and maximum values for the Y-axes.
Custom tick interval Controls the interval between axis ticks.
Log scale Makes the Y-axis scale logarithmic.


These options control the look of the chart grid.

  Axis color Sets the color of the x-axis line.
Grid color Sets the color of the grid lines.
Chart background Sets the color of the chart background.
Chart border color Sets the color of the inner chart border.
Background and Border

These options control the appearance of the chart background container. 

  Background Sets the chart background color.
Border Radius Adds rounded borders to the chart background. When the radius is 0, the background shape has 90° corners. Border radius of 100° produces a circular shape.
Opacity Sets the chart's opacity. 100% opacity completely hides objects behind the chart. 0% opacity makes the chart invisible.
Border Color Sets the chart border color.
Border Weight Sets the chart border line thickness.
Border Style Sets the chart border line style.
Add border shadow Adds a shadow to the chart lower and right borders.
Was this article helpful?
How can we improve it?