Layers and groups
- See also
Layers and groups give you a way to organize elements on your dashboard, report or other view as a collective unit. You can then show or hide them either when editing or when viewing.
Related video: Group and Layers
The editor for dashboards and other views lets you group multiple elements on the canvas together. Once grouped, you can easily apply operations to the set of elements as a whole, such as dragging the group to a new location.
If you have a chart and a table both displaying data from the same metric set, you may want to group the two components so they always appear side-by-side no matter where you move the group on the canvas.
To group two or more elements, first select them on the canvas by dragging a selection rectangle around all of the elements. If you're on a desktop, you can also press the CTRL key while clicking each of the elements in turn.
Once you've made the selection, go to the toolbar, click Arrange, and then click Group.
The grouped set of elements appears with a light blue background. You can move the group around the canvas by dragging it. You can even delete the group (and all of its elements) as a whole.
2.2. Show or hide a group
A group has its own set of properties, just like any individual element on the canvas.
Select a group on the canvas, and then open the Properties window to see the properties of the group.
Check or uncheck the Hidden property to hide or show the group.
To ungroup a set of elements, first select the group on the canvas.
Then go to the toolbar, click Arrange, and then click Ungroup.
The group is removed and you can access the elements individually again.
Whenever you add an element to the canvas, the element is slotted into the current layer. You also have the ability to add new layers and insert elements into the new layers as you like.
One reason for separating elements into different layers is when you have a complex dashboard with overlapping elements. As you're designing, you can hide layers that are completed and show just the layers you are actively working on. Layers can also be locked to prevent accidental modification (such as moving a chart out of position by mistake).
Another reason for using layers is to support dashboard implementation scenarios where viewers should be able to show or hide some content through an interaction. For example, a common case is to create a help overlay using layers for your dashboard, which is displayed when the viewer hovers over or clicks on a help button.
Click Layers to see the layers for your dashboard and manage them.
Layer 1 is automatically added when the dashboard is created, and any components that you initially add to the canvas will be placed in this layer.
3.1. View elements within a layer
A very useful feature in the Layers window is the ability to see the hierarchy of elements within a layer, including groups, scripts, and hidden items.
To view the elements for a specific layer, click the + button below the name of the layer.
The hierarchy of elements is displayed. When you select an item in this list, the corresponding element on the canvas is also selected. Double-click an item on the list to center your screen on it.
In addition, the icon for a layer actually contains a very tiny preview of elements within the layer. If you see a small colored rectangle within the icon, it means the layer has some elements in it.
If an item on the list has an expander arrow, it has a script or an interaction assigned to it. Click the expander to view the list of scripts with the associated action in parentheses. Click a script to open it in the Script Editor.
Groups are also listed, even if they are hidden. If you want to add components to the group, simply drag them overtop it. If you want to make a group visible again, select it in the Layers window and then go to the Properties window to modify the group's properties. For any other components (such as a chart), you can right-click the component in the list and then show or hide it.
3.2. Show or hide a layer
To show or hide a layer, toggle the 'eye' icon beside the layer in the Layers window.
To show or hide all layers in one operation, click the corresponding button at the top of the Layers window.
3.3. Lock or unlock a layer
Layers can be locked to prevent accidental modification (e.g., moving a chart out of position by mistake).
To lock or unlock a layer, toggle the 'lock' icon beside the layer in the Layers window.
To lock or unlock all layers in one operation, click the corresponding button at the top of the Layers window.
3.4. Rename a layer
Double click the name of a layer in order to change it.
You can also rename a layer from its Properties window.
3.5. Add a new layer
In the Layers window, click Add Layer from the toolbar to add a new layer.
The new layer will be positioned above existing layers in terms of z-order. It will also be set as the new current layer as indicated by its blue selection border.
3.6. Reorder the list of layers
In the Layers window, you can drag a layer and move it above another layer in the list. This will change the z-order of the layers. The elements from a layer that is at the top of the list (e.g. Layer 2) will always appear on top of elements from a layer that is lower in the list (e.g. Layer 1).
3.7. Set the current layer
The current layer is the one that is selected in the Layers window (appears with a dark selection color). Any elements that you add to the canvas will go into this current layer.
To change the current layer, simply select (e.g. click) the layer you want in the Layers window.
3.8. Delete a layer
To delete a layer (and all of its contained elements), select the layer in the Layers window and then click Delete Layers from the toolbar.
3.9. Move an element from one layer to another
In the Layers window, if you view the elements for one layer and another layer, you can move an element between the two layers using drag-and-drop.
To modify the properties of a layer, go to the Layers window. Expand the layer you want (by clicking its + button) and select the layer in the treeview.
Go to Properties to view or modify the properties of the layer, including its Script Name.
4. See also
- Video: Group and Layers
- Design overview
- Using dockable windows
- Using interactions
- Create a help overlay using layers
- Create a dashboard template