Icon

06 Switches

Exercise for creating an IF switch.

Use a switch to build one of the alternative graphs.

Exercise: SwitchesThe workflow below accesses life expectancy data for countries and regions. The bar chart shows theaverage life expectancy values by regions, and the choropleth world map shows the life expectancyvalues by countries. Your task is to build an IF switch that controls which of the two visualizations isshown.1.1) Create a Single Selection Configuration node with two options: "Regions" and "Countries"1.2) Encode the flow variable values Regions and Countries into "top" and "bottom", respectively, withthe Rule Engine Variable node1.3) Use an IF switch to separate the two workflow branches. Control the active port by the flowvariable with the possible values top and bottom.1.4) Encapsulate the nodes into a component. Select Countries or Regions in the component'sconfiguration dialog. Execute and open the component's view. Do you see the right graph? Node 29 Component CSV Reader Exercise: SwitchesThe workflow below accesses life expectancy data for countries and regions. The bar chart shows theaverage life expectancy values by regions, and the choropleth world map shows the life expectancyvalues by countries. Your task is to build an IF switch that controls which of the two visualizations isshown.1.1) Create a Single Selection Configuration node with two options: "Regions" and "Countries"1.2) Encode the flow variable values Regions and Countries into "top" and "bottom", respectively, withthe Rule Engine Variable node1.3) Use an IF switch to separate the two workflow branches. Control the active port by the flowvariable with the possible values top and bottom.1.4) Encapsulate the nodes into a component. Select Countries or Regions in the component'sconfiguration dialog. Execute and open the component's view. Do you see the right graph? Node 29 Component CSV Reader

Nodes

Extensions

Links