# GC.Spread.Sheets.ConditionalFormatting.IconCriterion

## Content

# Class: IconCriterion

[Sheets](../modules/GC.Spread.Sheets).[ConditionalFormatting](../modules/GC.Spread.Sheets.ConditionalFormatting).IconCriterion

## Table of contents

### Constructors

- [constructor](GC.Spread.Sheets.ConditionalFormatting.IconCriterion#constructor)

## Constructors

### <a id="constructor" name="constructor"></a> constructor

• **new IconCriterion**(`isGreaterThanOrEqualTo`, `iconValueType`, `iconValue`)

Represents an icon criteria with the specified parameters.

**`example`**
```javascript
//This example creates an icon rule.
activeSheet.setValue(0,0,1,3);
activeSheet.setValue(1,0,15,3);
activeSheet.setValue(2,0,25,3);
activeSheet.setValue(3,0,-1,3);
//rule
var iconSetRule = new GC.Spread.Sheets.ConditionalFormatting.IconSetRule();
iconSetRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
iconSetRule.iconSetType(GC.Spread.Sheets.ConditionalFormatting.IconSetType.fourTrafficLights);
var iconCriteria = iconSetRule.iconCriteria();
iconCriteria[0] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 1);
iconCriteria[1] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 10);
iconCriteria[2] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 20);
iconSetRule.iconCriteria(iconCriteria);
iconSetRule.reverseIconOrder(false);
iconSetRule.showIconOnly(false);
activeSheet.conditionalFormats.addRule(iconSetRule);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `isGreaterThanOrEqualTo` | `boolean` | If set to true, use the greater than or equal to operator to calculate the value. |
| `iconValueType` | [`IconValueType`](../enums/GC.Spread.Sheets.ConditionalFormatting.IconValueType) | The type of scale value. |
| `iconValue` | `Object` | The scale value. |
