Introduction to Data Binding

Contents[Hide]

1. Overview

For every data visualization that shows data on your dashboard, there is an underlying metric set which encapsulates the data that is being visualized, and a set of bindings which specify how the various parts of the data visualization are bound to data elements.

2. What are bindings?

Essentially, a binding is a mapping between:

  • a part of a data visualization (such as chart series labels or tooltips), and
  • one or more metric set elements (measures and/or hierarchies) from the underlying metric set.

The set of bindings for a data visualization on your dashboard is different depending on the type of data visualization. The bindings are organised by Series, A bar chart for instance has a number of bindings in each series such as:

  • Bar Height - lets you specify the measure that determines the height of each data point bar
  • Tooltip Text - lets you specify measures and hierarchies to be displayed in a tooltip when the user hovers over a data point
  • Label Text - lets you specify a measure or hierarchy to use for data point labels
  • Bottom Axis 1 Label - lets you specify a hierarchy or measure to use for bottom axis labels

Other chart types and other data visualization types have different sets of bindings (although there may be some bindings in common). 

While it is true that the same type of data visualization has the same types of bindings, the actual binding values (i.e., mappings to measures/hierarchies) are specific to each pair of a metric set and an instance of a data visualization. To illustrate, two data visualizations connected to the same metric set on a dashboard each have their own set of binding values as shown in the figure below.

Bindings are specific to each metric set and data visualization instance
Bindings are specific to each metric set and data visualization instance

3. Bindings in the Metric Set Designer

3.1. Default visualization

When you create a metric set using the Metric Set Designer, you have the ability to configure what's called the default visualization for that metric set. The default visualization serves as a template for instantiating a new data visualization instance, for example, when you drag the corresponding metric set from the Explore window to the dashboard canvas.

In the Metric Set Designer, you can configure the bindings for the default visualization by clicking the Bindings button in the Metric Set panel.

Click Bindings to switch to the Bindings tab which lets you edit the mappings for the default visualization
Click Bindings to switch to the Bindings tab which lets you edit the mappings for the default visualization

In the Bindings tab, you can see the various mappings that were assigned automatically when measures and hierarchies were first added to the metric set. In the example below, the Tooltip Text binding in the Series 1 Group has been configured with the LineTotal measure and the OrderDate hierarchy. 

Bindings tab shows the tooltip text of the default visualization is bound to the LineTotal measure and the OrderDate hierarchy
Bindings tab shows the tooltip text of the default visualization is bound to the LineTotal measure and the OrderDate hierarchy

3.2. Add elements to a binding

There are several ways to add a measure or hierarchy to a binding.

3.2.1. Drag from Explore to binding

Drag a measure or hierarchy (or hierarchy level) from the Explore window and drop it onto the binding you want in the Bindings tab (similar to adding elements to the metric set).

3.2.2. Drag within Bindings tab

Drag a measure or hierarchy from an existing binding in the Bindings tab and drop it onto the binding you want. Note that if you press the SHIFT key while you drag within the Bindings tab, this will actually move the measure/hierarchy from one binding to another.

3.2.3. Click to add

Use the click to add link in the binding's drop region and then select the measure or hierarchy you want from a list.

Click to add a measure or hierarchy to the LABEL TEXT binding in the SERIES 1 group
Click to add a measure or hierarchy to the LABEL TEXT binding in the SERIES 1 group

Click the LineTotal measure to add it to the binding
Click the LineTotal measure to add it to the binding

The default visualization in the Metric Set Designer will be automatically updated with the new binding value. In the example below, the Series 1 Label Text is bound to the LineTotal measure, and the default bar chart visualization now displays the LineTotal value at each data point.

Series 1 Label Text binding is configured with LineTotal measure
Series 1 Label Text binding is configured with LineTotal measure

Next, if you go to create a new dashboard and then drag this metric set onto the dashboard canvas, the resulting bar chart will also display data point labels initially because of this binding which was configured in the metric set's default visualization.

Note
If you add a measure or hierarchy that is not already part of the metric set to a binding, the metric set will be automatically updated with the new measure/hierarchy. You can see this by clicking the Metric Set button at the top of the Bindings tab which takes you back to the Metric Set definition.

3.3. Configure a measure or hierarchy

From the Bindings tab, click the Edit button of any measure or hierarchy to configure the corresponding metric set element. 

Click the Edit button to configure the LineTotal measure for this metric set
Click the Edit button to configure the LineTotal measure for this metric set

This opens the Configure Metric Set Element dialog which lets you see what bindings are using this measure/hierarchy, set up sorting for the measure/hierarchy, and modify settings such as Format and Symbol. For example, you can specify a dollar sign as a symbol that appears before LineTotal values.

Configure Metric Set Element dialog for the LineTotal measure
Configure Metric Set Element dialog for the LineTotal measure

Note that when you're configuring a metric set element in this way, you're actually modifying the metric set itself and not the binding (since a binding is just a mapping). This means that in order to view or change certain settings for the metric set element, the corresponding metric set must be checked out to yourself. In addition, changes to the metric set element, such as adding a symbol or changing the format string, will apply to all data visualizations connected to the metric set.

Tip
Use the Hidden property (new in Version 3.0) if you do not want a measure to be shown on the control, but still be usable for calculations, such as formulas. Data for it will not be sent to the client or export.

4. Using the Data Analysis Panel

4.1. Launching the panel

When you drag a metric set from the Explore window to the dashboard canvas, a new data visualization instance will be created with the same initial bindings and appearance as the metric set's default visualization. The bindings in this case are copied from the default visualization but you can customize them further from the Data Analysis Panel. For example, in the figure below, observe that the newly added bar chart displays data point labels just like the metric set's default visualization.

Drag a metric set from the Explore window to the dashboard canvas
Drag a metric set from the Explore window to the dashboard canvas

To open the Data Analysis Panel, use the right-click menu, or select the data visualization on the canvas and then click the Data Analysis Panel button in the toolbar.

Open the Data Analysis Panel from the toolbar or right-click menu
Open the Data Analysis Panel from the toolbar or right-click menu

The Data Analysis Panel is basically the same as the panel in the Metric Set Designer except that when you go to the Bindings tab, you're viewing and editing bindings specific to this data visualization instance (instead of the metric set's default visualization).

Click Bindings to view and edit the bindings for this data visualization instance
Click Bindings to view and edit the bindings for this data visualization instance

4.2. Data visualization drop zones

An easy way to set up bindings in the Data Analysis Panel is to drag a measure or hierarchy (or hierarchy level) from the Explore window and drop it onto a data visualization drop zone. These drop zones are overlays which appear over a data visualization and correspond directly to bindings. The available drop zones are different depending on the type of data visualization, whether you're adding a measure or hierarchy, and what bindings have already been mapped. Note that drop zones only appear if some initial data has already been added to the data visualization beforehand. For example, in the figure below, a LineTotal measure has already been added to the table.

Table visualization drop zones correspond directly to table bindings
Table visualization drop zones correspond directly to table bindings

Drop zones for a bar chart when adding a measure
Drop zones for a bar chart when adding a measure

4.3. Update the default visualization

Once you've customized the bindings for a data visualization instance, you can apply the settings back to the metric set's default visualization by clicking the Update button in the Data Analysis Panel. After the update, the next time this metric set is dragged to the canvas, the newly added data visualization will be of the same type and have the same binding settings as the updated default visualization.

Updating the default visualization for the underlying metric set
Updating the default visualization for the underlying metric set

4.4. Bindings versus properties

As seen with the Series 1 Label Text example, it is easy to set up a binding to display data in the form of a label or tooltip. All you need to do is drag-and-drop a metric set element such as a measure or hierarchy onto the desired binding target and the text that is displayed will be automatically based on the settings for the metric set element (e.g., symbol and format settings).

A more advanced option though is to use the Properties window for a data visualization to alternatively or further customize data point labels and tooltips.

As an example, consider a bar chart that does not have any measures added to its Series 1 Label Text binding. Go to the Properties window for the chart series, click the Text tab, and you'll see that there are no data point label settings for this chart.

Chart series text properties without any data point label settings
Chart series text properties without any data point label settings

Next, open the Data Analysis Panel for this chart, click Bindings, and then drag the LineTotal measure to the Series 1 Label Text binding.

Drag the LineTotal measure from one binding to another
Drag the LineTotal measure from one binding to another

Now go back to the Properties window for the chart series, click the Text tab, and you'll see that data point label settings have been automatically added. (Alternatively, you can just add these data label settings manually to the chart series without using bindings.)

Chart series text properties with data point label settings added
Chart series text properties with data point label settings added

Click Data Label Settings to customize the placement of the labels, and the text to display. The Text property accepts arbitrary text in addition to placeholder keywords (such as the name of a measure or hierarchy) enclosed in square brackets.

Customize the placement and text of the data point labels
Customize the placement and text of the data point labels

Tip
Placeholder keywords support an optional format string preceded by a colon that can be used to customize the numeric or date/time format that comes from the metric set. For example: [MeasureName:N0]

5. See also

 

Dundas Data Visualization, Inc.
500-250 Ferrand Drive
Toronto, ON, Canada
M3C 3G8

North America: 1.800.463.1492
International: 1.416.467.5100

Dundas Support Hours: 7am-6pm, ET, Mon-Fri