Detach a data control from a frame
2. Using a frame component
There are two ways to use a frame component while designing a dashboard.
2.1. Place a data control on top of the frame
The first way 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.2. Drag a metric set to the frame
The second way to use a frame component is to drag a metric set from the EXPLORE window directly to the frame.
The metric set will appear as a chart (for example) that fills up the content area of the frame. The chart is now 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 = window.dundas.context.baseViewService.currentView.getAdapters().getContainedAdapters(); window.dundas.context.baseViewService.currentView.getAdapters().detachAdapter(containedAdapter); containedAdapter.width = 100; containedAdapter.height = 100; window.dundas.context.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.