Using a Property for Coloring Purposes


The Color by axis in the map chart feature layer below is set to the Members column in the data table to the right. All states have the same color so far, because the Color mode is set to Fixed. Assume you wish to identify states where the number of members exceeds a certain user-controlled value that you specify in a text area. For example, you might want to color all states that have more than 1000 members in green.

To be able to do this, a color rule is added to the Fixed color mode. The rule includes a property, whose value is controlled from a text area,

First, insert the property control, an Input field, into the text area.

This opens the Property Control dialog, where the new property is defined. You give it name and specify its Data type and a start value.

No other settings are needed within the Property Control dialog.

The last step is to connect the property to the place that should react on changes to the property value, in this case a color rule on the Colors page in the Feature Layer Settings dialog. Click Add Rule, set Rule type to Greater than, and in the Value field, select Custom expression, and enter the created property (note the syntax) below Expression.

Now you can type a number in the input field in the text area, and the map chart coloring updates according to the color rule.

See also:

Controlling Properties from Text Areas