[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IColorScaleCriterion

IColorScaleCriterion Interface

Represents the criteria for the minimum, midpoint, or maximum thresholds for a color scale conditional format.

An IColorScaleCriterion defines one threshold in a color scale rule, including how the threshold value is determined and which color is assigned to that threshold. Use it through ColorScaleCriteria to inspect or customize the criteria in a two-color or three-color scale.

Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public interface IColorScaleCriterion
Public Interface IColorScaleCriterion
Examples
IColorScale colorScale = worksheet.Range["A1:A5"].FormatConditions
    .AddColorScale(ColorScaleType.ThreeColorScale);
IColorScaleCriterion criterion = colorScale.ColorScaleCriteria[1];
criterion.Type = ConditionValueTypes.Percent;
criterion.Value = 50;
criterion.FormatColor.Color = Color.Yellow;

Properties

Name Description
FormatColor

Gets a IFormatColor object that specifies the color assigned to thethreshold of a color scale conditional format.

Use the returned object to inspect or modify the color for the minimum, midpoint, or maximum threshold represented by this criterion.

Index

Gets an integer value that indicates which threshold the criterion represents.

Use this property to identify whether the criterion corresponds to the minimum, midpoint, or maximum threshold in a color scale conditional format.

Type

Returns one of the constants of the ConditionValueTypes enumeration, which specifies how the threshold values for a data bar or color scale conditional format are determined.

Use this property to inspect whether the criterion threshold is based on a number, percent, percentile, formula, or an automatic minimum or maximum value.

Value

Gets or sets the minimum, midpoint, or maximum threshold value for a color scale conditional format.

You can set the value only if the criterion type is set by Type to Number, Percent, Percentile, or Formula. If the threshold type is a formula, the value is specified or returned as a string. The formula must return a single number.