ig.excel.RankConditionalFormat

Exposes properties which control the visual attributes of a WorksheetCell based on whether a cell's value is within the top or bottom rank of values across the associated range.

Remarks

A rank condition evaluates to true if a cell value is within the range defined by the top or bottom n values across the associated range, where n represents the RankConditionalFormat.rank.

A popular example of a rank condition is "top ten ", where cell values which are within the range of the ten highest values across the range meet the condition. The RankConditionalFormat.rank property, however, can be set to any arbitrary number or percentage, and is not limited to only the top or bottom ten values.

By default, this condition evaluates to true if a cell's value is at or above the specified rank; to change this to the bottom of the ranking, set the RankConditionalFormat.topBottom property to 'Bottom'.

The numeric criteria can be changed to a percentage using the RankConditionalFormat.isPercent property. In this case, the Rank property is interepreted as a percentage.

Dependencies

jquery-1.4.4.js
infragistics.util.js
infragistics.ext_core.js
infragistics.ext_collections.js
infragistics.ext_collectionsExtended.js
infragistics.ext_io.js
infragistics.ext_text.js
infragistics.documents.core_core.js
infragistics.ext_ui.js
The current widget has no options.
The current widget has no events.
  • cellFormat
    Inherited

    .cellFormat( );
    Return Type:
    ig.excel.IWorksheetCellFormat
    Return Type Description:
    Returns a IWorksheetCellFormat.

    Returns an IWorksheetCellFormat interface implementation which represents the format for cells which meet the criteria associated with this condition.

    Remarks

    The IWorksheetCellFormat implementation defines the visual attributes which are applied to cells whose value meets the associated condition.

  • conditionType
    Inherited

    .conditionType( );
    Return Type:
    ig.excel.FormatConditionType
    Return Type Description:
    Returns a FormatConditionType.

    Returns a FormatConditionType value which identifies the type of condition for this instance.

  • isPercent

    .isPercent( );

    Returns a boolean value indicating whether the RankConditionalFormat.rank is determined by a percentage value.

    Remarks

    By default, this condition evaluates cell values against the value of the RankConditionalFormat.rank property, with the rank representing an explicit numeric value. Set this property to true to identify the rank as a percentage.

    If the IsPercent property is set to true, this property supports only values between 1 and 100, inclusively.

  • isPercent

    .isPercent( value:boolean );

    Sets a boolean value indicating whether the RankConditionalFormat.rank is determined by a percentage value.

    • value
    • Type:boolean

    Remarks

    By default, this condition evaluates cell values against the value of the RankConditionalFormat.rank property, with the rank representing an explicit numeric value. Set this property to true to identify the rank as a percentage.

    If the IsPercent property is set to true, this property supports only values between 1 and 100, inclusively.

  • priority
    Inherited

    .priority( );

    Returns a value which determines the order of evaluation when multiple conditional formatting rules exist.

    Remarks

    By default, conditions are evaluated in the order in which they appear within the containing collection.

    This property makes it possible to weight one condition over another, essentially overriding the condition's ordinal position within the collection.

    A lower number means a higher priority; for example, a condition with a priority of 1 is evaluated before one with a priority of 2.

    If a cell value meets more than one condition, the format defined by the first condition to be evaluated takes precedence.

    Setting the priority on one condition may cause the value of other conditions in the collection to be changed to ensure that each condition has a unique value.

  • priority
    Inherited

    .priority( value:number );

    Sets a value which determines the order of evaluation when multiple conditional formatting rules exist.

    • value
    • Type:number

    Remarks

    By default, conditions are evaluated in the order in which they appear within the containing collection.

    This property makes it possible to weight one condition over another, essentially overriding the condition's ordinal position within the collection.

    A lower number means a higher priority; for example, a condition with a priority of 1 is evaluated before one with a priority of 2.

    If a cell value meets more than one condition, the format defined by the first condition to be evaluated takes precedence.

    Setting the priority on one condition may cause the value of other conditions in the collection to be changed to ensure that each condition has a unique value.

  • rank

    .rank( );

    Returns a value which specifies either the number or percentage of the rank value for the associated condition.

    Remarks

    The default value of this property is 10, and the default value for the RankConditionalFormat.topBottom property is 'Top', so that creating an instance of this class without specifying non-default property values results in a "top ten" condition.

    The value of this property is interepreted as either a number or a percentage, depending on the value of the RankConditionalFormat.isPercent property.

    If the IsPercent property is set to true, this property supports only values between 1 and 100, inclusively.

  • rank

    .rank( value:number );

    Sets a value which specifies either the number or percentage of the rank value for the associated condition.

    • value
    • Type:number

    Remarks

    The default value of this property is 10, and the default value for the RankConditionalFormat.topBottom property is 'Top', so that creating an instance of this class without specifying non-default property values results in a "top ten" condition.

    The value of this property is interepreted as either a number or a percentage, depending on the value of the RankConditionalFormat.isPercent property.

    If the IsPercent property is set to true, this property supports only values between 1 and 100, inclusively.

  • regions
    Inherited

    .regions( );

    Returns the WorksheetRegion which identifies the cell range with which this condition is associated.

  • setFirstPriority
    Inherited

    .setFirstPriority( );

    Sets the ConditionBase.priority value for this rule such that it is the first condition to be evaluated. Applicable only in the case where there is more than one element contained within the associated collection.

    Remarks

    When multiple conditions exist in the same collection, the order in which they are evaluated has bearing on which format is applied to cells which meet those conditions.

    This method ensures that the associated condition is the first one to be evaluated.

    To make a condition the last one to be evaluated, use the ConditionBase.setLastPriority method.

  • setLastPriority
    Inherited

    .setLastPriority( );

    Sets the ConditionBase.priority value for this rule such that it is the last condition to be evaluated. Applicable only in the case where there is more than one element contained within the associated ConditionalFormatCollection.

    Remarks

    Just as the ConditionBase.setFirstPriority method ensures that the associated condition is evalulated first, the SetLastPriority method ensures that the associated condition is evaluated last.

    Calling this method on more than one condition essentially replaces the previously designated condition as the last one to be evaluated with this one.

  • setRegions
    Inherited

    .setRegions( regionAddress:string, cellReferenceMode:ig.excel.CellReferenceMode );

    Replaces the existing regions with new ones

    • regionAddress
    • Type:string
    • A string with one or more comma separated region address
    • cellReferenceMode
    • Type:ig.excel.CellReferenceMode
    • An optional cell reference mode

    Exceptions

    Exception Description
    ig.ArgumentException If regionAddress is invalid or contains a region from another worksheet
  • stopIfTrue
    Inherited

    .stopIfTrue( );

    Returns a boolean indicating whether additional formatting rules are evaluated if this rule evaluates to true. Applicable only in the case where the containing collection contains more than one element.

    Remarks

    If a cell value meets more than one condition, the format defined by the first condition takes precedence. Individual format properties are "merged" during the resolution process; for example, if one format has red borders and another has a red foreground color, a cell value which meets both conditions may be formatted with both red borders and a red foreground color.

    This property makes it possible to short-circuit the resolution process, so that no other conditional formats are applied after the first condition evaluates to true.

    Using the above example, assume StopIfTrue is set to a value of true on the conditional format with red borders, a second conditional format exists with a red foreground color, and a cell value meets both conditions. Because the StopIfTrue setting prevents additional formats from being evaluated, the cell will not show a red foreground color, whereas with StopIfTrue being set to false, it would show both red borders and a red foreground color.

    In addition to preventing subsequent conditions from being evaluated, the order in which conditions are evaluated can be controlled using the ConditionBase.priority property.

  • stopIfTrue
    Inherited

    .stopIfTrue( value:boolean );

    Sets a boolean indicating whether additional formatting rules are evaluated if this rule evaluates to true. Applicable only in the case where the containing collection contains more than one element.

    • value
    • Type:boolean

    Remarks

    If a cell value meets more than one condition, the format defined by the first condition takes precedence. Individual format properties are "merged" during the resolution process; for example, if one format has red borders and another has a red foreground color, a cell value which meets both conditions may be formatted with both red borders and a red foreground color.

    This property makes it possible to short-circuit the resolution process, so that no other conditional formats are applied after the first condition evaluates to true.

    Using the above example, assume StopIfTrue is set to a value of true on the conditional format with red borders, a second conditional format exists with a red foreground color, and a cell value meets both conditions. Because the StopIfTrue setting prevents additional formats from being evaluated, the cell will not show a red foreground color, whereas with StopIfTrue being set to false, it would show both red borders and a red foreground color.

    In addition to preventing subsequent conditions from being evaluated, the order in which conditions are evaluated can be controlled using the ConditionBase.priority property.

  • topBottom

    .topBottom( );
    Return Type:
    ig.excel.FormatConditionTopBottom
    Return Type Description:
    Returns a FormatConditionTopBottom.

    Returns a value indicating whether a cell value must fall within the top or bottom of the ranking across the associated range.

  • topBottom

    .topBottom( value:ig.excel.FormatConditionTopBottom );
    Return Type:
    ig.excel.FormatConditionTopBottom
    Return Type Description:
    Returns a FormatConditionTopBottom.

    Sets a value indicating whether a cell value must fall within the top or bottom of the ranking across the associated range.

    • value
    • Type:ig.excel.FormatConditionTopBottom
  • workbook
    Inherited

    .workbook( );
    Return Type:
    ig.excel.Workbook
    Return Type Description:
    Returns a Workbook.

    Returns a reference to the associated workbook.

  • worksheet
    Inherited

    .worksheet( );
    Return Type:
    ig.excel.Worksheet
    Return Type Description:
    Returns a Worksheet.

    Returns a reference to the associated worksheet.

Copyright © 1996 - 2024 Infragistics, Inc. All rights reserved.