Skip to main content
waffle.svg
Domo Knowledge Base

Formatting Data Label and Hover Text in Your Chart

Version 23

 

Intro

Data labels and hovers in charts have the same purpose—to show the value of a chart element such as a bar, bubble, etc. However, they differ in the way they present this information. Data labels, when turned on, always appear for every element in a chart. This makes it easy for viewers to see information quickly but may also cause a chart to appear cluttered. Hovers, by contrast, appear only when a viewer mouses over a chart element. Using hovers rather than data labels may make identifying exact values more time-consuming; however, this also makes a chart look more clean and professional.

By default, most charts use hovers, not data labels, to show the most important information for each chart element. You can change this default behavior by doing any of the following:

  • Turning on data labels by entering the desired label text in Data Label Settings > Text in Chart Properties. This causes data labels to always appear. Default hover text also appears when viewers mouse over chart elements.

  • Changing the default hover text by specifying your own text in the Hover Text Settings > Text property in Chart Properties.

  • Including both data labels and customized hovers by specifying both data label and hover text in Chart Properties.

Some chart types have different behavior than that explained above. These differences will be explained in continuation.

Video - Applying Data and Hover Labels

 

Turning On and Customizing Data Labels

In most chart types that allow data labels, you turn on data labels by entering the desired data label text Data Label Settings > Text in Chart Properties.

There are a number of options you can use to customize data labels. These are also found in Chart Properties > Data Label Settings. These options do not work unless you enter text in Data Label Settings > Text.

To turn on and customize data labels for most chart types,

  1. Open the Analyzer for the chart you want to edit.

  2. In Chart Properties, click Data Label Settings.

  3. (Optional) Enter the desired text in the Text field.
    You can insert macros here by clicking the "+" button and selecting the desired macro. For more information about macros, see Data label macros.

  4. (Optional) Set the other options in Data Label Settings as desired. These options are described in continuation.

Data Label Options for Graphs

The following table lists and describes all of the options in Chart Properties > Data Label Settings available for graphs. You can click a thumbnail image to see a larger image.

Option

Description

Examples

Text

Specifies text for the data labels. This property is the "on switch" for data labels—you must specify text for them to appear.

You can insert macros here by clicking the "+" button and selecting the desired macro. For more information about macros, see Data label macros.

Show One Label

Determines whether a single label is shown for an entire stack in a Vertical Stacked Bar graph. By default this single label represents the topmost data item in a stack, but you can change the represented data item by entering the desired macro in the Text field. For example, to implement a single label that represents the total value of a stack, you would enter %_CATEGORY_TOTAL in the Text field. This is the data label that is shown in the example at right.

Show 

Available for Pareto charts. This property determines whether data labels are shown parallel to the bars in the chart or rotated 90 degrees. 

Position

Determines where data labels are shown in relation to their corresponding data items. The example shows a chart in which the data label position for a Vertical Bar graph has been set to Inside Top.

Fill

Lets you add a colored fill to your data labels. The example at right shows a chart in which a red fill color with 45% transparency has been added. 

data_labels_fill.png

Fill Color

Lets you specify the color for the fill in your data labels. This property is only available when you check the Fill box.

Fill Transparency Percent

Lets you specify the fill transparency for data labels. You can specify any number between 0 and 100, in which 0 is completely opaque and 100 is completely transparent. This property is only available when you check the Fill box.

Rotate

Lets you rotate data labels 90 degrees. The example at right shows a chart in which this has been done.

data_labels_rotated.png

Justification

Determines the justification for multi-line data labels—either Left, Center, or Right. The example graph includes multi-line data labels that have been left-justified (by selecting Left for the Justification property).

Show when zero

Determines whether data labels are shown for graph elements with a value of 0.

Use scale format

Determines whether data labels use the same formatting that has been set for the value scale.

Use scale abbreviation

Determines whether data labels use the same scale abbreviation that has been set for the value scale.

Percent Value Decimal Places

Determines the number of decimal places used in percentage values in data labels.

Allow Overlap

Determines whether data labels are still shown when they overlap. For most chart types, data labels will not overlap unless you select this option. Recommended only for charts with a small number of series.

Show Data Labels On 

Determines whether data labels appear for lines, bars, or both in line-bar combination charts.  

Data Label Options for Maps

The following table lists and describes all of the options in Chart Properties > Data Label Settings available for maps. (Some map types, such as latitude-longitude maps, do not have data labels.) You can click a thumbnail image to see a larger image.

Option

Description

Examples

Text

Specifies text for the data labels. This property is the "on switch" for data labels—you must specify text for them to appear.

You can insert macros here by clicking the "+" button and selecting the desired macro. For more information about macros, see Data label macros.

Font Size

Allows you to increase or decrease the data label font size. The "Default" font size falls between the largest and second-smallest font sizes. For more information, see Changing the Font Size in Your Chart.

Text Color Lets you determine the text color for your map data labels. If you select "Default," the color will be automatically determined based on the background color. This is shown in the example at right, in which the data labels on darker areas appear white and those on lighter areas appear dark red.  map_data_labels_text_color.png
Value Abbreviation Determines whether data label values are abbreviated (the default being 3 significant digits) or not.

Fill

Lets you add a colored fill to your map data labels. The example at right shows a chart in which a pale blue fill color with 60% transparency has been added. 

map_data_labels_fill.png

Fill Color

Lets you specify the color for the fill in your map data labels. This property is only available when you check the Fill box.

Fill Transparency Percent

Lets you specify the fill transparency for map data labels. You can specify any number between 0 and 100, in which 0 is completely opaque and 100 is completely transparent. This property is only available when you check the Fill box.

Data Label Macros

Domo lets you add macros to data labels to reference different data items. A variety of macros is available. You can open a list of selectable macros by clicking the "+ button in the Text field. 

For example, if you wanted all data labels in a Vertical Bar graph to show the category name, followed by a colon and space, followed by the data item value, you would 1) select the Category Name macro from the dropdown, 2) add a colon and a space after the %_CATEGORY_NAME text in the field, and 3) select the Value macro from the dropdown. The data labels would then look similar to the ones in the following graph:

data_label_macros_newer.png

Available macros depend upon the selected chart type.

Data Label Macros for Most Graphs

Data labels for most types of graphs, including bar and line charts, area charts, and so on, can include the following macros: 

Macro

Description

Category Average

The average of all series in each category in a Stacked Bar chart.

Category Name

The name of the category that the data item belongs to.

Category Number

The number of the category that the data item belongs to.

Category Total

The sum of all the data values in the category that the data item belongs to.

Graph Total

The sum of all the values in the graph.

Percent of Category

The data value represented as a percentage of the sum of all the data values in the category.

Percent of Total

The data value represented as a percentage of the sum of all the data values in the graph.

Percent of Previous

The data value represented as a percentage of the sum of the previous category in a Funnel graph.

Series Name

The name of the data series that the item belongs to.

Series Number

The number of the data series that the item belongs to.

Tooltip Field 1-3

Allow you to include additional data in your chart by referencing columns you have dragged into the Tooltip fields above the graph (which you can toggle on or off by clicking Tooltips in the icon bar at the top of the Analyzer window). For more information, see ?

Value

The value of the data item.

For more information about value, category, and series data, see Understanding Chart Data.

Data Label Macros for Pie and Donut Graphs

You can customize the label text that appears in slices in Pie and Donut graphs. You do this in Chart Properties, in the Data Label Settings > Text property. You can use any of the following macros:

Macro

Description

Name

The name of the data item for a given slice.

Value

The value of the data item.

Percent of Total

The data value represented as a percentage of the sum of all the data values in the graph.

In the example screenshot below, the user has entered the following text for this property: %NAME: %_PERCENT_OF_TOTAL

Data Label Macros for Maps

You can customize the label text that appears in slices in most map types (with the exception of a few types such as Latitude-Longitude maps). You do this in Chart Properties, in the Data Label Settings > Text property. You can use any of the following macros:

Macro

Description

Long Name

The full name of the region (which is the name used by default).

Name

An abbreviated designation for the region, usually a two-letter state or country abbreviation (such "MA" for Massachusetts).

Range Name

The name of the range (if range names have been specified using the Ranges chart properties).

Tooltip Field 1-3

Allow you to include additional data in your chart by referencing columns you have dragged into the Tooltip fields above the graph (which you can toggle on or off by clicking Tooltips in the icon bar at the top of the Analyzer window). For more information, see ?

Value

The value of the associated region.

Code

(Japan map only) The name of the Japanese prefecture in Japanese characters.

Data Label Macros for Tree Maps

By default, data labels in Tree Maps show only the category names for each data item. You can customize these labels to show the information you want. You do this in the Label Settings > Text field.

You can use any of the following macros to change the default label text in Tree Maps:

Macro

Description

Category Number

The number of the category that the item belongs to.

Graph Total

The total of all data values in the Tree Map.

Name

The category name of the data item.

Percent of Total

The data value represented as a percentage of the sum of all the data values in the Tree Map.

Series Number

The number of the data series that the item belongs to.

Value

The value of the data item.

For example, if you wanted each square in your Tree Map to show the data item name followed by that item's percentage of all items in the Tree Map, you would 1) select the Name macro from the dropdown in Label Settings > Text, 2) add a colon and a space after the %_NAME text in the field, and 3) select the Percent of Total macro from the dropdown. The following screenshot shows an example Tree Map that depicts the percentage of each U.S. state's population in the country.

Data Label Macros for Gantt Charts

By default, data labels in Gantt and Percent Complete Gantt charts show category names, item names, and date ranges, in that order. For example: "Sprint 1: Write PRD: 2013-02-05 - 2013-02-16." You can replace this default text with your own custom text.

You can use any of the following macros to change the default label text in Gantt charts :

Macro

Description

Category 

The category for the data item. Only available if you break up the chart data by dropping a column into the Category field above the chart.

End Date

The end date of the data item.

Item

The name of the data item.

Percent Complete The percentage of completion of the data item. (Available in Gantt Percent Complete charts only.)

Start Date

The start date of the data item.

Tooltip Field 1-3

Allow you to include additional data in your Gantt chart by referencing columns you have dragged into the Tooltip fields above the graph (which you can toggle on or off by clicking Tooltips in the icon bar at the top of the Analyzer window). For more information, see ?

Customizing Hover Text

In most chart types, hover text always appears when you mouse over chart elements and cannot be turned off. However, you can customize the text to appear the way you want. A variety of options for customizing hover text is available in Chart Properties > Hover Text Settings.

Some chart types have different options for hover text. For example, in maps, hover labels appear only in the card view, not the Details view. Maps also have a different set of macros for specifying hover text, as do Tree Maps and Gantt charts. These chart types are discussed later.

To customize hover text for most chart types,

  1. Open the Analyzer for the chart you want to edit.

  2. In Chart Properties, click Hover Text Settings.

  3. Enter the desired text in the Text field.
    You can insert macros here by clicking the "+" button and selecting the desired macro. For more information about macros, see Hover text macros.

  4. (Optional) Set the other options in Hover Text Settings as desired. These options are described in continuation.

Hover Text Options

Hover Text Options for Graphs

The following table lists and describes all of the options in the Chart Properties > Hover Text Settings for most chart types. 

Option

Description

Text

Lets you set the text that appears in chart hovers. You can insert macros here by clicking the "+" button and selecting the desired macro. For more information about macros, see Hover text macros.

Use scale format

Determines whether hovers use the same formatting that has been set for the value scale. This property overrides the Hover Format, Divide Value By, Decimal Places, and Negative Numbers properties.

Use scale abbreviation

Determines whether hovers use the same scale abbreviation that has been set for the value scale.

Hover Format

Determines whether values in hovers have currency or percent symbols affixed. This property is overridden by the Use scale format property.

Divide Value By

When set, values in hovers are divided by the specified factor. This option is useful when the values in your chart are very large and you want to abbreviate them by dividing by a common number. For example, if the values in your chart represented millions of dollars, you could choose to divide by millions—all of the values in the hovers would then be reduced to more manageable single digits. When you choose to divide by Percentage, the numbers in the value scale are multiplied by 100. This property is overridden by the Use scale format property.

Decimal Places

Determines the number of decimal places in values in hovers. This property is overridden by the Use scale format property.

Negative Numbers

Determines the format for negative numbers. If you select -100, all negative numbers have a minus symbol affixed. If you select (100), all negative numbers are enclosed in parentheses. This property is overridden by the Use scale format property.

Hover Text Options for Maps

The properties in the following table are found in the Hover Text category in Chart Properties for maps. 

Option

Description

Examples

Hover Text

Lets you set the text that appears in map hovers. A variety of macros for showing map values in your hovers is available. For a list of available macros, see Map Hover Text Macros.

Always Show Over Map Specifies whether hover text specified using the Hover Text option is turned on for your chart. 

Hover Text Macros

Domo supports macros you can use in hover text to reference different data items. Available macros differ between chart types.

Hover Text Macros for Most Chart Types

Hover text macros for most chart types include the following:

Macro

Description

Category Name

The name of the category that the data item belongs to.

Category Number

The number of the category that the data item belongs to.

Category Total

The sum of all the data values in the category that the data item belongs to.

Graph Total

The sum of all the values in the graph.

Percent of Category

The data value represented as a percentage of the sum of all the data values in the category.

Percent of Total

The data value represented as a percentage of the sum of all the data values in the graph.

Series Name

The name of the data series that the item belongs to.

Series Number

The number of the data series that the item belongs to.

Tooltip Field 1-3

Allow you to include additional data in your chart by referencing columns you have dragged into the Tooltip fields above the graph (which you can toggle on or off by clicking Tooltips in the icon bar at the top of the Analyzer window). For more information, see ?

Value

The value of the data item.

For example, if you wanted all hovers in a Vertical Bar graph to show the category name, followed by a colon, followed by the data item value, you would 1) select the Category Name macro from the dropdown, 2) add a colon and a space after the %_CATEGORY_NAME text in the field, and 3) select the Value macro from the dropdown.

Hover Text Macros for Gantt Charts

By default, hover labels in Gantt and Percent Complete Gantt charts show category names, item names, and date ranges, in that order. For example: "Sprint 1: Write PRD: 2013-02-05 - 2013-02-16." You can replace this default hover text with your own custom text.

You can use any of the following macros to change the default hover text in Gantt charts:

Macro

Description

Category 

The category for the data item. Only available if you break up the chart data by dropping a column into the Category field above the chart.

End Date

The end date of the data item.

Item

The name of the data item.

Percent Complete The percentage of completion of the data item. (Available in Gantt Percent Complete charts only.)

Start Date

The start date of the data item.

Tooltip Field 1-3

Allow you to include additional data in your Gantt chart by referencing columns you have dragged into the Tooltip fields above the graph (which you can toggle on or off by clicking Tooltips in the icon bar at the top of the Analyzer window). For more information, see ?

For example, if you wanted each bar in your Gantt Percent Complete chart to show the words X% complete, where "X" is the percentage of completion, you would 1) select the Percent Complete macro from the dropdown, and 2) add the word "complete" after the %_PERCENT_COMPLETE% text. The following screenshot shows an example Gantt chart in which this replacement text has been used:

 

Creating Multi-Line Labels

You can enter line breaks in data and legend labels by specifying \\n in the appropriate field.

To enter a line break in a label,

  1. Open the chart you want to edit in Analyzer.

  2. In Chart Properties > Data Label Settings > Text, append \\n to the label text you want to format.

For example, if you wanted to format the data labels in the preceding screenshot to look like the following...

...you would enter the following in Chart Properties > Data Label Settings > Text: %_CATEGORY_NAME:\\n%_VALUE.

By default, multi-line data labels are center justified. You can change the justification by clicking Chart Properties > Data Label Settings, then selecting the Justification option you want.

Referencing Tooltip Fields

You can use macros in data labels and hovers to reference columns you have dropped into the Tooltip fields above the chart preview. You can use up to 3 such fields. This is an excellent way to show data for columns that are not used to build the chart. In the following example, the chart creator has built a standard Bar graph that shows sales by order date. He also wants to show the data for profit, discount percentage, and shipping costs. One way to do this would be to add those columns as series, as discussed in Applying DataSet Columns to Your Chart. However, in this case the chart creator decides he wants to keep the chart as simple to read as possible. He decides to add the columns to the Tooltip fields and then reference them using the Tooltip 1-3 macros available in the dropdown in Chart Properties > Hover Text Settings > Text. So the text in his Text field would appear as follows:

SALES: %_VALUE \\n PROFIT: %_TOOLTIP1 \\n DISCOUNT: %_TOOLTIP2 \\n SHIPPING COST: %_TOOLTIP3

He also sets the format and decimal places of the "Sales" value in Chart Properties > Hover Text Settings and the formats and decimal places of the other values in the Format dropdowns in the respective fields above the chart preview (since changes to the Hover Text Settings affect only the primary value column used to build the chart). 

Now, whenever a user hovers over any of the bars in the chart, a hover label appears displaying all of the information he wanted, as shown in the screenshot:


tooltip_macros_example.png 

To build data labels or hover labels referencing tooltip fields,

  1. Open the chart you want to edit in Analyzer.

  2. (Conditional) If the Tooltips fields are not appearing above your chart preview, click Tooltips in the icon bar to toggle them on.

    tooltips_location.png

  3. Drag a column you want to reference into Tooltip Field 1, above the chart preview.

    tooltip_field.png

  4. (Optional) If you want to reference more than one tooltip field, drag the desired columns into Tooltip Field 2 and Tooltip Field 3.

  5. Open Chart Properties > Data Label Settings or Chart Properties > Hover Text Settings.

  6. In the Text field, create the text you want to appear in the data labels or hover labels, using the Tooltip 1-3 macros from the dropdown menu and any other macros you think are appropriate.