Detach a data control from a frame
2. Using a frame component
The way to use a frame component is to place an existing data visualization control (e.g., a chart) on top of the frame component.
For example, suppose you have the following dashboard with an existing metric set (chart) and a frame component:
Simply drag the chart and place it over the frame. Then reposition the chart and resize it as you like. In this case, there is no association between the chart and the frame. For example, if you reposition the frame, the chart will stay in the same place.
2.1. Attaching a metric set to the frame
Until version 2.6, you could drag a metric set from the EXPLORE window directly to the frame.
The metric set would appear as a chart (for example) that fills up the content area of the frame. The chart is attached to the frame and will resize in concert with the frame.
3. Detach a data control from its frame
If you have a metric set (chart) that is attached to a frame, there is no way to detach it by using the UI. You need to run a script to do this.
As an example, add a button component to your dashboard. Go to the Properties window for the button, expand its Click interaction, and then add a script.
var containedAdapter = this.baseViewService.currentView.getAdapters().getContainedAdapters(); this.baseViewService.currentView.getAdapters().detachAdapter(containedAdapter); containedAdapter.width = 100; containedAdapter.height = 100; this.baseViewService.currentView.addAdapters(containedAdapter);
To run the script, switch to View mode and click the button. You should see the chart removed from the frame and positioned elsewhere on the canvas.