4 Right-click the first cell of the table. Choose Insert➛Grid. On Insert Grid, set Number of columns to 2 and Number of rows to 2, then choose OK. A new grid appears above the chart, as shown in Figure 42‑6.
Figure 42‑6 Inserting a grid
5 To create HTML buttons for the report, perform the following steps:
1 Right-click the first cell of the grid. Choose Insert➛HTML Button.
2 On HTML Button, type "2D with Depth" into the value field.
3 Choose OK. If a warning message appears, choose OK.
6 Repeating the process of step 6, create an HTML button in the remaining empty cells of the grid with the values "2D", "resize 400x600", and "resize 600x400".
Task 2: Script the chart sub_type controls
In this task, you add event handler scripts to HTML buttons that change the subtype controls of the chart.
1 Select the chart. In the property editor, open Properties➛Bookmark. Set the bookmark value to "ChartBookmark" as shown in Figure 42‑7.
Figure 42‑7 Setting the chart bookmark property
2 Select the 2D with Depth HTML button and choose Script.
3 In the New Event Function drop-down list, select onclick. The onclick event handler appears in the script editor text box.
4 After the first curly brace ( { ), add the following code:
var bchart = this.getViewer().getCurrentPageContent()
.getChartByBookmark("ChartBookmark");
bchart.setChartTitle("Orders by Country (2D with Depth)");
bchart.setDimension(actuate.report.Chart
.CHART_DIMENSION_2D_WITH_DEPTH );
bchart.submit();
5 Return to the layout editor. Select the 2D HTML button and choose Script.
6 In the New Event Function drop-down list, select onclick. The onclick event handler appears in the script editor text box.
7 After the first curly brace ( { ), add the following code:
var bchart = this.getViewer().getCurrentPageContent()