This page explains how to create graphics and charts, based on the results of a query, to best showcase your data. Looker keeps your query details and visualization configuration data together. When you share a query, recipients get your visualization as well as the data.
Quick guide
You can add an eye-catching visualization to any query result set on an Explore.
- Create and run your query.
- Select the Visualization tab.
- Select the type of visualization that best displays your data. For more options, select
…
to the right of the displayed visualization options. - Select Edit to configure the visualization option settings, such as naming and arranging chart axes, choosing the position and type of each data series, or modifying the chart color palette.
You can further customize your visualization by specifying which dimensions and measures to include in the visualization. If your data is missing key values, you can tell Looker to fill in those values on the appropriate part of your visualization.
Choosing a visualization type
After you create and run your query, select the Visualization tab in the Explore to configure your visualization options. Use the chart buttons to pick a visualization type.
The visualization type that you select determines how Looker represents the data series in your chart. A data series is a set of related data points plotted on a chart. For example, the number of orders placed each day for a set of dates is a series. In a column chart, a series is represented by columns of the same color; in a line chart, a series is represented by a single line. You can see a list of the series for your chart in the series menu, and on the chart legend.
Customizing visualizations with chart settings
You can customize a visualization to make your data more readable and to add visual styling. Select Edit to see the visualization options, then change the settings to get a result that suits you.
To see the visualization options available for a particular visualization type, select that type on the Visualization types documentation page.
Including multiple visualization types on a single chart
To create a chart that includes more than one visualization type:
- Select the Edit button to show the customization options.
- Select the Series tab.
- In the Customizations section, an entry appears for each series in the chart. Select the arrow next to the series to display its customization options.
- In the Type box, select the type of visualization to use for that series.
Charts with multiple series types always layer line series and scatter series in front of area, column, and bar series.
To alter the layering order of column, bar, and area series, change the series' positions in the data table and select the Run button. The leftmost series layers on top and the rightmost series layers on bottom.
Creating stacked charts with multiple visualization types
You can include stacked series in a chart with multiple visualization types. All series of the same type as the chart overall will stack together; series of other types will not stack. For example, in a column chart, column series will stack, but line series will not stack.
By default, series are added to the Left Axes section of the Y menu. To create a stacked chart that uses multiple y-axes, drag any series to a different axis in the Y menu. The stacked series will appear together. All other series can be moved independently, including individual series within a pivot.
Specifying LookML fields to include in the visualization
Looker adds all dimensions and measures that are selected in the field picker to any visualization. Sometimes, you might not want to display every dimension or measure in the chart.
Hiding fields from visualizations
Looker does not re-run queries to exclude fields or values that are hidden using Hide from Visualization or Hide "No"s from Visualization for table calculations. As a result, calculations based on fields with hidden Explore values may display unexpected results.
To hide a field from the visualization, follow these steps:
- Select the gear icon at the top right corner of the column.
- Select Hide this field from visualization.
To enable or disable a charted series, select the name of the series in the visualization's legend. When disabled, the series color turns gray in the legend and the data disappears in the chart. Select the series' name again to re-enable it.
To hide table calculations from a visualization, see the instructions on the Using Table Calculations page.
Hiding specific columns of data in a pivoted visualization
You can hide specific columns of data in a visualization of pivoted Explore results with one of the following methods:
You can also hide an entire field from a visualization, as described in the previous section on this page.
Using the legend in the visualization
You can use the legend in a visualization to hide specific columns of data from a pivoted visualization.
To show or hide a column's data, follow these steps:
- In the legend, select the labels for any categories of data that you want to hide. The value labels you select will be grayed out in the legend, and the visualization will update to exclude the data from the visualization.
- Optionally, select grayed out labels in the legend to add the data back to the visualization.
As an example, the following stacked column chart, which displays information about user counts by created month, has been pivoted by the Age Tier dimension. The legend at the bottom of the visualization lists each Age Tier tier range that is included in the visualization and provides information about the color-coding for each tier.
You can hide the data for the Age Tier tier range values 10 to 19 and 20 to 29 from the visualization by selecting the labels 10 to 19 and 20 to 29 in the legend.
In this example, since the values 10 to 19 and 20 to 29 have been selected in the legend, the visualization hides data for users who belong to these age tiers from the visualization.
Using the gear menu in the data table of the Explore
You can use the gear menu in the data table of an Explore to hide specific columns of data from a pivoted visualization.
To hide a specific column of data from a visualization, follow these steps:
- Select the field's gear icon at the top of the column in the data table.
- Choose Hide this column from visualization from the drop-down menu.
For any values that you have selected, that data will not be displayed in the visualization, and those values will not be displayed in the legend for the visualization.
Filling in missing dates and values
Some datasets have values, such as dates, that follow a predictable pattern. You might pull data by a timeframe and find that some dates, weeks, months, or other date types don't have a corresponding value. By default, the data table and the visualization will display the dates that the query returns and skip any missing dates. Looker's dimension fill option lets you display the missing dates or other values in the data table and on the corresponding axis of the query's visualization.
Dimension fill is particularly useful for queries where many days have no data or null data.
If you do not use dimension fill, Looker connects the data points it has, resulting in a potentially misleading graph that does not show the dates for which there is no data.
Turning on dimension fill adds the missing dates and makes the graph more informative.
To use dimension fill, select the appropriate dimension's gear menu in the Data section of an Explore. Choose the Fill in Missing Dates or Fill in Missing Values option.
Dimension fill is available for dimensions with yes/no values, tiered values, and most date types. It can also be applied to any dimension based on a list of values, via the case
or tier
parameters.
Dimension fill turns on automatically for queries that run with a single dimension and/or a single pivot, as long as you haven't applied filters to any measures. Dimension fill can also be applied to multiple dimensions at once in a query — including pivoted dimensions — however, Looker may automatically disable dimension fill to optimize query performance if it detects that too many fields will be generated with filled values.
You cannot use dimension fill in certain cases, such as the following:
When your Looker developer used the
order_by_field
parameter or disabled theallow_fill
parameter on certain dimensions.When dimensions have a filter applied to them and also have a fixed number of values, such as yes/no, days of the week, days of the month, and so on. Filtering against these field types eliminates the values that Looker needs to predictably and accurately fill in any missing values.
When Looker detects that too many rows or columns will be generated with filled values and automatically disables dimension fill to optimize query performance.
The visualization tooltip
When you hover over a datapoint in a visualization, the tooltip displays the value of the selected dimensions and measures by default.
You can use Liquid variables in an html
parameter to customize the information that is displayed in the tooltip. Visit the Getting the most out of visualizations in Looker: Tooltip customization cookbook for a step-by step guide and examples.