This recipe will show you how to create a dashboard with the option of switching between two charts.
Open a new SAP BusinessObjects Dashboards file and drag two different chart components (for example, a Line Chart and a Pie Chart component) into the empty canvas. Drag the Label Based Menu component found in Selectors into the canvas as well.
1
in the Key field:2
:Status:
in cell A1 and put value 1
in cell B1:Trend
and Division
. Make sure that Trend
has the first position and Division
has the second position. You can change the positions by using the little arrows on the bottom left-hand side of the window. In addition, by default there are five entries. To remove the other three entries, just click on the X icons to the right.In this recipe, we used one of the selector components in combination with the Dynamic Visibility functionality to switch between the two charts. Each chart has a unique key assigned: value 1 for the line chart and value 2 for the pie chart. By making a selection in the Label Based Menu selector, either the value 1 or value 2 was inserted into spreadsheet cell B1. The Dynamic Visibility setup in this recipe implies that if cell B1 has value 1, Line Chart will be shown. If cell B1 has value 2, the Pie Chart will be shown.
Thus, a component is hidden when any other value than its key is entered in the status cell.
This recipe used two chart components with Dynamic Visibility settings. But, the Dynamic Visibility functionality is embedded in all other components too, except for the Source Data component and the History component. You can even use Dynamic Visibility with grouped components to dynamically show or hide a group of components!
When you set up Dynamic Visibility you are not restricted to using only numerical values; you can use any value you want as a Dynamic Visibility key for a component. If you do this, make sure you also change the Insertion Type of your selector component into Label. The labels should always match the key exactly.