Expanding or collapsing all chart nodes by selecting their labels

You can expand or collapse the current chart node in the tree or organization chart on a visual dashboard by selecting their labels. See an example of expanding or collapsing the chart nodes on the basis of the DEMO.EMPLOYEE example project.

Before you begin

You must have a visual dashboard with an added Organization Chart or Tree Chart.

About this task

To expand or collapse a chart node:

Procedure

  1. In the DEMO.EMPLOYEE example project, in the Project Explorer view expand the OrganizationChart1 component, DataTemplate1(Query1), Leve11 and select Label1.
  2. Add the Set Values action for the Click event of the Label1:
    OrganizationChart1.DataTemplate1.Level1.ChildLink1.Expanded=
    !OrganizationChart1.DataTemplate1.Level1.ChildLink1.Expanded
  3. Click Runtime tab and expand or collapse chart nodes by clicking their labels.