Limiting Data Using Property Expression


In this example, a property expression is used to pick out details for a certain category from a bar chart that is otherwise quite packed with information. The stacked bars show the amounts of protein, carbohydrates, and fat in different items of food.

Assume you want to look closer at one item at a time, and you want to specify which item to look at from a text area, as shown below.

Do as follows:

In a text area, insert the property control, in this case, a drop-down list.

This opens the Property Control dialog, where you create the property via New. You give it a name, specify its Data type and a start value.

Now that the property exists, define which values the property should be able to assume. In this example, the unique values in the 'Food'  column should be available for selection in the drop-down list.

Finally, the property is then connected to the Limit data using expression setting on the Data page of the Properties dialog (via Edit). The expression excludes all other food types except the value of the property as currently selected in the drop-down list.

 

See also:

Controlling Properties from Text Areas