Spotfire® User Guide

Adding or editing labels in visualizations

You can show labels for different items within the visualization. Depending on the visualization type, the column to label by can contain regular text (or numbers), a binary column with images, a geometry column, etc.

About this task

This example shows a bar chart with labels on all bars:

Tip: Labels within bar segments, pie sectors, waterfall chart blocks, and so on, are only drawn if they fit within the segment. If no labels are shown, try increasing the item width, using a smaller font for the label, or removing some percentage decimals.

Note that labels shown on the axes are handled in the axis sections of the visualization properties instead. See Adjusting scales on axes for more information.

Before you begin

A visualization that supports editing of labels must be available.

Procedure

  1. In the visualization properties, locate the Labels section.


  2. For some visualization types, you can select the column containing the information to show under Label by. Other visualization types only support adding labels for what is shown on the axes.
  3. Determine whether to Show labels for All or Marked rows.
    (In the visualization properties panel, you remove the Labels card to remove the labels. In the visualization properties dialog or popover, there is a None option for removing labels.)
  4. Under Label configurations, you can specify details about the labels such as the placement of labels, if you want to use a Max number of labels, whether to show actual values or percentages, and so on. Different visualization types have different settings. See also the first example below, Specific visualization label settings.
    If the max number of labels specified is smaller than the available number of items, the labels will be evenly distributed.
    The Number of decimals option specifies the number of decimals to show when percentage is used.
    Note: Bar percentage usually only relevant when you have selected the option 100% stacked bars under Appearance, and when the bars are colored by a column or hierarchy. The number specified here will also affect the number of decimals shown for the visualization items in the tooltip.
  5. For some visualization types, you can change the Label orientation from Horizontal to Vertical and vice versa, whereas in others (pie charts), you can change the Label position from Inside pie to Outside pie.
  6. If the visualization has support for labels with other content than text, you can also change the Label rendering. See the second example below for more information.

Results

The visualization labels are updated.

Specific visualization label settings

For the visualization types Line chart and Parallel coordinate plot, you can choose to Show line identifier and/or Show individual values. The Line identifier shows labels representing the categories used to create each line (by coloring or line by). The Individual values shows labels with the values for all points used to create the line.

In a Pie chart, you can choose what to show for the pie sectors. Sector percentage show labels with the percentage of the total that each sector represents. Sector value shows the actual value of the sector. Sector category shows the category name defining the sector. You can skip showing labels for smaller sectors by specifying a higher Sector percentage threshold.

Note: In the Scatter plot, or in a marker layer in a Map chart specified to show pies as markers, you have access to the Label configurations for the pies within the Shape section of the visualization properties.

In a Bar chart, you can show labels on the complete bar and/or on bar segments only. If you choose to show labels on bar segments, you can choose to show either the actual value, or the bar segments' percentage of the total value.

In a Waterfall chart, you can show labels on running totals or on blocks.

The Number of decimals option specifies the number of decimals to show.
Note: Bar percentage is only applicable when you have selected the option 100% stacked bars on the Appearance page, and it gives relevant information only when the bars are colored by a column or hierarchy. The number specified here will also affect the number of decimals shown for bar segments in the tooltip.

In the Tree map, the label options are located in the Hierarchy section of the visualization properties panel. You can select to Show hierarchy headers and/or to Show labels.

Showing other items, such as images, geometries or molecular structures in a label

Depending on the type of the selected visualization you might be able to add other items than text in the labels. If this is the case, you will have access to the Label rendering section when editing the labels.

Here is an example of a scatter plot with images in the labels of all markers:

If you want to show images from a binary image column or a geometry column in your data table, you select that column directly under Label by. In some cases, like when you want to show linked chemical structures, you will instead select an ID column here, which at a later step is mapped against the desired output.

Your company might have configured some type of virtual column producers that can take the values from the selected column and transform them in one way or another, to produce a desired output. In that case, you will see an entry called Get content from, in the settings for the label rendering. For example, you might be able to select Structure Column here, to show molecular structures from an information link in the labels.

For embedded images in the current data table, or when fetching data via a URL, you should leave this setting at (Selected column).

If the selected source has some settings available, you can reach those by clicking on the Settings button next to Get content from.

For example, this is where you would specify which information link to retrieve structures from, if your company has enabled a virtual column producer for showing chemical structures.

The Show as drop-down list lets you select how the data in the selected column should be interpreted.

For example, use Text for plain text labels. Use Image if there are binary images in your data that you want to use in the labels. Use Link if the text should be interpreted as a web link. Use Image from URL if the image is picked from a web resource location. Use Geometry if your data is a shapefile or GeoJSON file and you want to show the geometrical shapes in the labels.

If the selected Show as method has settings that can be modified, you can reach them by clicking Settings. See Renderer settings for more information about some common renderers.

If the selected label is some kind of image, you can increase or decrease the size of the image using the slider.