Bar visualization
This article applies to the following Customer Insights roles: Developer
Similar to a column chart, but bars are displayed horizontally. As a general rule, you can display more data points in a bar chart than you can in a column chart. Bar charts are also more suitable if your data points have long category names: United States of America fits better horizontally than it does vertically.
In this article:
- Customizing the Visualization
- The Plot Tab
- The Series Tab
- The Values Tab
- The X Tab
- The Y Tab
Customizing the visualization
To customize the bar chart visualization (change colors, change the number format, change the axis label, etc.), click Edit to display the parameters menu:
Each of the tabs on this menu, and each configuration option found on these tabs, is detailed in the next few sections of this documentation.
The Plot tab
Configuration options for the entire visualization.
Series Position
Determines how values are displayed in a chart that has multiple data series. Allowed values are:
-
Grouped. Series are displayed in groups:
-
Stacked. Series are cumulatively plotted on the chart, with the total value (the Y axis value) representing the combined value of each series in the group:
-
Stacked Percentage. Series values are displayed as percentages, with all values adding up to 100%.
Inner Spacing
Determines the relative amount of spacing between bars (which effectively sets the height of each bar). Values can range from 0 (minimum spacing) to 1 (maximum spacing). For example, here’s a chart with inner spacing set to 0:
And here’s the same chart with inner spacing set to .5:
Spacing
Determines the relative amount of spacing between column groups (which effectively sets the width of each column). Values can range from 0 (minimum spacing) to 1 (maximum spacing). For example, here’s a chart with spacing set to 0:
And here’s the same chart with spacing set to .5:
This feature can only be used with charts that plot more than one dataset.
Hide Legend
When set to On, the chart legend is displayed:
When set to Off, the chart legend is not displayed:
Limit Displayed Rows
When set to On, enables you to show (or to hide) a specific set of rows. When you set Limit Displayed Rows to On, you’ll see the following options:
The first list (Hide) specifies whether you want to hide or to show the designated rows. If you choose the hide the rows, all the rows in the table except the selected rows will be displayed. If you choose to show the rows, only the selected rows will be displayed.
To specify the rows, start by using the second list (First) to determine if you want to show or hide the First X number of rows or the Last X number of rows in the table. (You cannot show or hide rows found in middle of the table; for example, you can’t hide rows 25-to-50.) After making your selection then, in the Rows field, enter the number of rows to be displayed or hidden. For example, here we’ve chosen to show the last 8 rows in the table:
If the original visualization looked like this:
The modified visualization looks like this:
The Series tab
Configuration options for individual data series.
Colors
Enables you to apply a custom color scheme to the chart. For example, here’s a chart that uses the default color scheme, Looker Classic:
And here’s that same chart with the Mixed Neutrals color scheme applied:
Show Full Field Names
When Show Full Field Names is set to On, the entire field name, including the name of the Explore, is shown in the visualization:
When set to Off, only the field name is displayed:
Customizations
Used to modify each series displayed in the chart. Allowed values are:
-
Color. To change the color of a bar, click the Color arrow and then, from the dropdown menu, click a new color:
If you have a specific color in mind, you can type the hex value or the CSS color name of that color in the color field:
-
Label. By default, each series uses the underlying field name as its label:
However, you can change the label for any series by clicking the arrow next to the series name and then typing a new name in the Label field:
That changes the label as displayed in the visualization:
-
Type. Specifies the type of chart used by the visualization. Valid types are:
- Area
- Column
- Line
- Scatter
For example, suppose you start with a bar chart:
If you set the Type to Line, the visualization will change accordingly:
If the visualization has multiple data series, you can apply a different type to each series. For example, one series could be plotted as a bar chart and another could be plotted as a scatterplot.
The Values tab
Configuration options for individual data points.
Value Labels
When set to On, displays the value of each data point in the chart:
When set to Off value labels are not displayed:
Label Null Columns
When set to On, value labels are displayed for null data points. When set to Off, labels are not displayed for null values:
Value Colors
Specifies a different color for value labels (by default, value labels use the same color as the underlying series). For example:
The value color can be set using an RGB hex value or a CSS color name. For example, this sets the value labels to red:
The chart will then look similar to this:
Font Size
Specifies the font size for value labels. Typically, this is done by indicating a pixel size; for example, 14px sets the font size to 14 pixels (points):
This sample chart uses the default font size for labels:
And this one uses labels with a font size of 18 pixels (18px):
Value Rotation
Enables you to rotate value labels the specified number of degrees (-360 to 360). For example, this chart has Value Rotation set to 0 (the default value):
This chart has Value Rotation set to 45 degrees:
This option is valid only if the Series Positioning is set to Grouped.
Value Format
Specifies how numeric values are displayed in the visualization. For example, if you want to display your value using a single decimal point, use this format:
#,###.0#
Customer Insights uses Microsoft Excel-style formatting for specifying value formats. For more information, see Guidelines for using decimal places, spaces, colors, and conditions.
Value Density
Slider control that determines the number of value labels displayed in the chart. For example, this chart has the slider set all the way to the right, the maximum density:
And this chart has the slider control set to medium density:
The X tab
Configuration options for the X (horizontal) axis.
Scale Type
Determines how the X axis is configured and displayed. Allowed values are:
-
Automatic Based on Data. Customer Insights analyzes the underlying data and sets the X axis scale based on the data types.
-
Ordinal. The X axis is scaled to show evenly-spaced data points, regardless of the relative distance between those points.
-
Time. The X axis is plotted using datetime values. This option is available only if the underlying data is datetime-based.
Reverse Axis
Changes the direction of the X axis. For example, suppose you have a chart that looks like this:
If you set Reverse Axis to On, the chart will “flip,” with the top series becoming the bottom series, the second series becoming the next-to-last series, etc.:
Show Axis Name
When set to On, the chart displays the name of the X axis:
When set to Off, the chart does not display the name of the X axis:
To set the axis name, type the name in the Axis Name field.
Axis Value Labels
When set to On, labels for each series are shown on the X axis:
When set to Off, series labels are not displayed:
Gridlines
When set to On, horizontal gridlines are shown on the chart:
When set to Off, horizontal gridlines are not shown:
This option is available only if Axis Value Labels is set to On.
Label Rotation
Enables you to rotate the X axis labels the specified number of degrees (-360 to 360). For example, this chart has Label Rotation set to 0 (the default value):
!
This chart has Label Rotation set to 45 degrees:
Time Label Format
Specifies how datetime options are displayed on the X axis. For example, to display a date as March 2018 uses this format:
%B %Y
For other datetime formatting options, see Time Formatting for Charts.
This option is available only if the Scale Type is set to Time.
Time Tick Count
Sets the approximate number of tick marks used in the chart; for example, setting Time Tick Count to 10 means the chart displays 10 evenly-spaced tick marks.
This option is available if the Scale Type is set to Time.
Padding Left
Specifies the amount of whitespace (in pixels) between the left side of the chart and the left side of the X axis. To set the padding, type in any integer value between 0 and 100. For example, this chart has a padding of 0:
Padding Right
Specifies the amount of whitespace (in pixels) between the right side of the chart and the right side of the X axis. To set the padding, type in any integer value between 0 and 100. For example, this chart has a padding of 0:
And this one has a padding of 100:
The Y tab
Configuration options for the Y (vertical) axis.
Gridlines
When set to On, vertical gridlines are shown on the chart:
When set to Off, vertical gridlines are not shown:
Reverse Axes
Toggles the position of the Y axis. By default, data runs from left to right:
When Reverse Axes is set to On, data runs from right to left. For example:
Top 1 / Bottom 1
For visualizations with multiple data series, enables you to individually configure each series’ axis.
Scale Type
Specifies how the Y axis is configured and displayed. Allowed values are:
-
Linear. Data is plotted using evenly-spaced intervals:
-
Logarithmic. Data is plotted using a logarithmic scale:
This option is best-used if your data set includes a set of extremely small values as well as a set of extremely large values. With more normalized data, this type of scale can be misleading, making the data points appear closer together than they really are.
Show Axis Name / Axis Name
When set to On, the chart displays the name of the Y axis:
When set to Off, the chart does not display the name of the Y axis:
To set the axis name, type the name in the Axis Name field.
Show Axis Values
When set to On, Y axis values are displayed:
When set to off, Y axis values are not displayed:
Unpin Axis from Zero
By default, the Y axis starts at 0:
By setting Unpin Axes From Zero to Yes, however, you cause the Y axis to begin at the lowest value in the data rather than beginning at 0:
Y Axis Format
Specifies how numeric values are displayed along the Y axis. For example, if you want to display your value using a single decimal point, use this format:
#,###.0#
Customer Insights uses Microsoft Excel-style formatting for specifying value formats. For more information, see Guidelines for using decimal places, spaces, colors, and conditions.
Tick Density
Sets the number of “tick marks” (reference points) displayed on the axis. Two options are available to you:
- Default
- Custom
When set to Default, you chart might look similar to this:
When set to Custom, you’ll be given a slider control that lets you add or delete tick marks: sliding the control to the left decreases the number of tick marks, while sliding the control to the right increases the number of tick marks. Suppose you move the slider slightly to the right:
That gives you a chart (and tick marks) that look like this:
Minimum Value
Minimum value displayed on the Y axis. By default, the Y axis starts at 0:
However, by configuring the Minimum Value, you can have at the Y axis start anywhere. For example, here the Y axis start at 100:
Maximum Value
Maximum value displayed on the Y axis. By default, the Y axis displays the largest number in the dataset:
By setting the Maximum Value, however, you can limit the highest displayed number. For example, this graph sets the maximum displayed value to 1,000:
Reference Lines
Reference lines emphasize a specific value in your chart. For example, this chart includes a reference line that shows the median number of profiles per email provider:
To add a reference line to a chart, click Add Reference Line. In turn, the following options will be available to you:
-
Type. Options include:
- Line
- Range
- Line with Margins
-
Value. Specifies the value of the reference line. Options include:
- Median. Line is drawn at the median value in the dataset. The median value is the point that half the values are above and half the values are below.
- Average (mean). Line is drawn at the average value in the dataset.
- Maximum. Line is drawn at the largest value in the dataset.
- Minimum. Line is drawn at the smallest value in the dataset.
- Custom. Specifies the exact value where the reference line will be drawn.
-
Label. Specifies the label for the reference line. If left blank, the reference line uses its value as the label.
-
Label Position. Specifies the position of the label on the reference line. Allowed values are:
- Left
- Center
- Right
-
Color. Specifies a different color for the reference line (the default color is black). To change the line color, click the color icon:
The line color can be set using an RGB hex value or a CSS color name. For example, this sets the reference line to green:
-
Value Format. Specifies how numeric values are displayed in the visualization. For example, if you want to display your value using a single decimal point, use this format:
\ #,###.0#
Customer Insights uses Microsoft Excel-style formatting for specifying value formats. For more information, see Guidelines for using decimal places, spaces, colors, and conditions.
To delete a reference line, click the Delete button (X) located next to the reference line name:
Trend Line
Trend lines show trends in your data. For example, are user registrations going up? Are user account deactivations going down? Trend lines help you answer questions like these. In the visualization, a trend line looks similar to this:
To add a trend line to your chart, click Add Trend Line. When you do that, the following options become available to you:
-
Trend Type. Specifies the type of trend line to use on the chart. Allowed values are:
- Linear. The trend line is a straight line that fits the data as closely as possible. Linear trend lines are typically used when the data rises or falls at a fairly consistent rate.
- Exponential. Treats data points on the Y axis as exponential values of the data points on the X axis. This type of trend line, which cannot be used if the Y axis contains values less than or equal to 0, is typically used only if Y values rise or fall at very high rates.
- Logarithmic. The trend line plots Y values as logarithmic functions of the X values. This type of trend line, which cannot be used in any of the X values are less than or equal to 0, is typically used only if Y values increase or decrease very quickly and then level out.
- Moving Average. Data is repeatedly plotted as the average of all the previous data points. This type of trend line can often smooth out fluctuations in the data and present a clearer picture of the trend.
If you use the Moving Average trend line you can also specify a custom Period (any integer value). The Period specifies how many data points are included in each group being averaged. For example, to base your trend line on monthly changes, you can set the Period to 30 days (roughly one month).
If the Period is not defined then the moving average is calculated using all the previous data points.
-
Series Index. Specifies which series the trend line is applied to. By default, Customer Insights applies the trend line to first data series in your dataset. The first series has a series index of 1. To apply the trend line to the second data series, set Series Index to 2.
-
Show Label. When set to On, a label is attached to the trend line. When set to Off, only the line itself is displayed:
-
Label Type. Specifies the value of the trend line label.
- String. Applies a custom label to the trend line; simply type the label in the Label field. If you leave the Label field blank, the trend line uses set the label to the Trend Type (for example, Moving Avg for a trend line that uses a moving average).
- R^2. Displays the R^2 (coefficient of determination) label of the trend line. The R^2 label tells you well the trend line represents the data. Higher R^2 values are better than lower R^2 values: if the value is 0, the trend line does not match the data at all, and if the value is 1 the trend line perfectly matches the data.
- Equation. Displays the equation used to draw the trend line.
-
Label Position. Specifies the position of the label on the trend line. Allowed values are:
- Left. The label is displayed on the left side of the trend line.
- Center. The label is displayed on the right side of the trend line.
- Right. The label is displayed in the middle of the trend line.
-
Color. Specifies a different color for the trend line (the default color is black). To change the line color, click the color icon:
The line color can be set using an RGB hex value or a CSS color name. For example, this sets the reference line to green:
-
Value Format. Specifies how numeric values are displayed in the visualization. For example, if you want to display your value using a single decimal point, use this format:
#,###.0#
Customer Insights uses Microsoft Excel-style formatting for specifying value formats. For more information, see Guidelines for using decimal places, spaces, colors, and conditions.
To delete a trend line, click the Delete button (X) located next to the trend line name:
Updated over 2 years ago