Skip to main content

Icon Ranges

  • 4 minutes to read

Icon Ranges allow you to use predefined or custom sets of icons to apply conditional formatting to different ranges of values.

Create a Format Rule in the WinForms Designer

To format values according the required condition, click the data item menu button, select Add Format Rule | Icon Ranges and choose the required icon set.

IconRanges_Menu

This invokes the Range Set dialog containing the set of value ranges and corresponding icons. The Grid dashboard item on the right displays the default formatting applied using the predefined set of 3 icons.

IconRangeSetDialog

This dialog allows you to change the following options specific to Icon Ranges.

  • The Format Style combo box allows you to change the icon set used to apply formatting.
  • The Use % ranges check box specifies whether the percent or absolute scale is used to generate ranges.

    Note

    Note that this option is not available for date-time dimensions.

  • To change the icon displayed for values corresponding to the specified range, click the button next to the required icon and select a new icon.

    IconRangeSetDialog_ChangeIcon

    Select No Style to disable the indication for the required range.

  • You can change range boundaries by specifying the required values.

    IconRangeSetDialog_ChangeRangeStop

    Note

    Note that a new value should fall into a range between corresponding values of the previous and next range.

  • To change the comparison logic for the required range, click the comparison sign and select the required option.

    IconRangeSetDialog_ChangeComparisonLogic

    The greater or equal sign includes the smallest value of the current interval while the greater sigh excludes the smallest value from the current interval and includes it in the next interval.

  • Use the Add and Delete buttons to add new ranges or delete the selected range respectively. Note that new range is added below the selected range.
  • Use the Reverse button to reverse the order of style settings corresponding to different ranges.

Create a Format Rule in the Web Dashboard

In the Conditional Formatting section, click the plus button to add a new format rule:

Select the data item you want to format and set the condition type to Icon Ranges:

Select the required icon set:

This invokes the Icon Ranges dialog containing the set of value ranges and corresponding icons. The Grid dashboard item on the right displays the default formatting applied using the predefined set of 3 icons.

Create a Format Rule in Code

Range conditions (Icon Ranges and Color Ranges) allow you to apply formatting using a predefined set of value ranges and corresponding style settings. You can use a predefined set of colors/icons to apply formatting or use custom ranges and corresponding icons/colors.

  1. To use a predefined set of colors/icons, pass the required FormatConditionRangeSetPredefinedType enumeration value to the FormatConditionRangeSet constructor and assign the resulting FormatConditionRangeSet object to the DashboardItemFormatRule.Condition property.
  2. To use a predefined set of colors/icons and custom range boundaries, do the following.

  3. To use custom range boundaries and the required style specified for each range, do the following.

Assign the resulting FormatConditionRangeSet object to the DashboardItemFormatRule.Condition property.

The following example shows how to apply conditional formatting to Grid cells:

View Example: How to Apply Conditional Formatting to Grid Cells