The JavaScript for DropDown1_switch, Plan and Actual section of Sample2mod.bqy is:
var choice=ActiveDocument.Sections["Plan and Actual"].Shapes.DropDown1_switch[DropDown1_switch.SelectedIndex]; switch (choice) { case 'Planned vs. Actual': ActiveDocument.Sections["PlanActualCostsChart"].Facts.RemoveAll(); ActiveDocument.Sections["PlanActualCostsChart"].Facts.Add('Costs Plan'); ActiveDocument.Sections["PlanActualCostsChart"].Facts.Add('Costs Actual'); ActiveDocument.Sections["PlanActualSoldChart"].Facts.RemoveAll(); ActiveDocument.Sections["PlanActualSoldChart"].Facts.Add('Units Sold Plan'); ActiveDocument.Sections["PlanActualSoldChart"].Facts.Add('Units Sold Actual'); ActiveDocument.Sections["PlanActualRevenueChart"].Facts.RemoveAll(); ActiveDocument.Sections["PlanActualRevenueChart"].Facts.Add('Revenue Plan'); ActiveDocument.Sections["PlanActualRevenueChart"].Facts.Add('Revenue Actual'); break; case 'Planned': ActiveDocument.Sections["PlanActualCostsChart"].Facts.RemoveAll(); ActiveDocument.Sections["PlanActualCostsChart"].Facts.Add('Costs Plan'); ActiveDocument.Sections["PlanActualSoldChart"].Facts.RemoveAll(); ActiveDocument.Sections["PlanActualSoldChart"].Facts.Add('Units Sold Plan'); ActiveDocument.Sections["PlanActualRevenueChart"].Facts.RemoveAll(); ActiveDocument.Sections["PlanActualRevenueChart"].Facts.Add('Revenue Plan'); break; case 'Actual' : ActiveDocument.Sections["PlanActualCostsChart"].Facts.RemoveAll(); ActiveDocument.Sections["PlanActualCostsChart"].Facts.Add('Costs Actual'); ActiveDocument.Sections["PlanActualSoldChart"].Facts.RemoveAll(); ActiveDocument.Sections["PlanActualSoldChart"].Facts.Add('Units Sold Actual'); ActiveDocument.Sections["PlanActualRevenueChart"].Facts.RemoveAll(); ActiveDocument.Sections["PlanActualRevenueChart"].Facts.Add('Revenue Actual'); break; }