Introduction to Data Binding
- What are bindings?
- Bindings in the Metric Set Designer
- Using the Data Analysis Panel
- See also
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.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
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).
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.
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.
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.
Next, open the Data Analysis Panel for this chart, click Bindings, and then drag the LineTotal measure to the Series 1 Label Text binding.
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.)
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.
5. See also
- Data Binding Examples
- Design Overview
- Create a metric set and add a filter
- Using chart properties
- Apply colors to data points or series using color rules
- Formatting Text