Exercise: Using the Assignment Operator

  To assign a specific chart type with the Assignment command button:

  1. In Design mode, select the Assignment button and choose Dashboard, then Scripts.

  2. Navigate to ActiveDocument, then Sections, then RevByTime, then Properties and double-click ChartType.

    The script should look like this:

    ActiveDocument.Sections["RevByTime"].ChartType
  3. Type the assignment operator (=) after the ChartType property.

  4. Navigate to Constants, then BqChartType and double-click bqChartTypePie.

    The script should now look like this:

    ActiveDocument.Sections["RevByTime"].ChartType=bqChartTypePie
  5. Click OK to save the script and close the Script Editor.

  6. Toggle to Run mode and click the Assignment button, then click the Comparison button.

    Clicking the Assignment button assigns the chart type Pie to the RevByTime chart. Subsequent clicks on the Comparison button displays the alert false because the chart type is not vertical bar.