This page describes the options for editing single value charts in the visualization menu. This menu can be accessed by clicking the gear in the upper right corner of the visualization tab.
The single value visualization always displays a value from the first row. Use sorting and filtering as needed so that the desired data is in the first row. A single value visualization uses, in priority order:
- the leftmost measure
- the leftmost table calculation based on a measure
- the leftmost dimension
- the leftmost table calculation that does not involve a measure
You can change which field is used in the visualization by dragging fields to change their position, or by hiding fields from the visualization that you don’t want displayed.
Single value visualizations have automatic font sizing. Looker chooses the largest standard font size that fully displays the current value. When there are several single value visualizations on a dashboard, Looker ensures that they all display using the same font size, giving a consistent appearance. Since data can change, Looker dynamically adjusts the font size to fit the current data. If even the smallest standard size cannot show the entire value in the space available (such as the dashboard tile) then the value is truncated by an ellipsis (…).
Please note that some of the options listed in the menu may be grayed out or hidden in situations where they would conflict with other settings you have chosen.
Style Menu Options
Choose a color collection from the Collection drop-down menu. A collection allows you to create themed visualizations and dashboards that look good together. You can see all the palettes in each of Looker's built-in color collections on the Color Collections documentation page. Your Looker admin may also create a custom color collection for your organization.
Value Color enables you to set the color of the single value visualization. The default is dark gray.
When you click the color swatch under Value Color, Looker displays a color picker where you can select a color, input a hex string like
#2ca6cd, or input a CSS named color string like
You can also pick one of the colors from the color collection you selected in the Collection drop-down. To do so, click the Palettes tab on the color picker to scroll through the categorical palettes in that collection.
Looker will use the selected color for single value visualizations both with and without hyperlinks.
Depending on your use case, consider using the following alternate techniques:
- Much of the time the desire to change font color is related to showing good or bad results. This use case can be best handled by turning on the Show Comparison option and choosing Show as Change.
- If you want to change the font color for a particular field's value everywhere, including the data table, a LookML developer can do so by adding a
htmlparameter to the field definition.
Show Title determines whether or not a title is displayed under the number. For a saved Look, the default title is the name of the Look. You also can specify a different title using the Title field.
Title Override specifies the title that you want to display with the value. This field is available when Show Title is on. For a saved Look, if this field is left empty, the title defaults to the name of the saved Look.
Value Format specifies the format of the value, independent of the underlying dimension or measure. The field accepts Excel-style formatting. If no formatting is specified, the value will be displayed in the format of the underlying dimension or measure.
You can read Excel's complete guide about how to specify these formats in their documentation. However, color formatting is not currently supported in Looker.
For Looker developers: The formatting used in the Value Format field is the same as formatting used with the
value_formatLookML parameter, except that the
value_formatparameter requires the formatting string to be enclosed in double quotes. In the Value Format field, the formatting string is not enclosed in quotes.
See this documentation page for some common formatting options for numeric fields.
Comparison Menu Options
Show Comparison enables you to use a second field to add comparison information to your single value visualization. In general, the comparison value uses the next field that would be displayed as the single value visualization. If there is no other field in the first row to compare with, a field in the next row will be used for comparison. You can affect which field is displayed by changing the order of fields or choosing Hide from Visualization for fields that you want to skip.
Style specifies how the comparison field is used in the single value visualization. The following options are available:
Show as Value - The value of the comparison field is displayed at the bottom.
Show as Change - The value of the comparison field is displayed at the bottom. If the value is negative, a triangle points downwards. If the value is positive, the triangle points upward. By default, a negative number is displayed in red with a red triangle and a positive number is displayed in green with a green triangle. These colors can be changed using the Positive Numbers Are Bad field. Looker does not automatically calculate any rate of change when you use this option; it just uses the raw value you provide. Therefore, you must choose a field or create a table calculation to provide the value.
Calculate Progress - The value of the field used for the single value visualization is divided by the comparison field's value. This percentage is displayed as a progress bar.
Calculate Progress (with Percentage) - The value of the field used for the single value visualization is divided by the comparison field's value. This percentage is displayed as a progress bar. The bar is labeled with the percentage and the value of the comparison field, such as
88% of $500,000. If Show Label is
Onthen the progress bar also shows the label for the comparison field, such as
88% of $500,000 Monthly Target.
Positive Values Are Bad
Positive Values Are Bad specifies the text and triangle colors displayed for the comparison field. When Positive Values Are Bad is turned on, Looker displays the negative numbers as green text with a green triangle, while positive numbers appear as red text with a red triangle. This parameter is only available when the Style is set to Show as Change.
Show Label determines whether or not a label is shown with the comparison field. By default, the label is the name of the comparison field.
Label enables you to provide a different label to the comparison field's name. This option is only available when Show Label is on.