Exposes properties which displays data bars in a [[WorksheetCell]] based on the cell's value as relative to the associated range.

DataBarConditionalFormat

new DataBarConditionalFormat(a: number): DataBarConditionalFormat

Returns DataBarConditionalFormat

Returns or sets a [[WorkbookColorInfo]] object which defines the color of the axis.

get axisColor(): WorkbookColorInfo

Returns WorkbookColorInfo

set axisColor(a: WorkbookColorInfo): void

Parameters

Returns void

Returns or sets a [[DataBarAxisPosition]] value which determines whether an axis is displayed.

get axisPosition(): DataBarAxisPosition

Returns DataBarAxisPosition

set axisPosition(a: DataBarAxisPosition): void

Parameters

Returns void

Returns or sets a [[WorkbookColorInfo]] object which defines the border color of the data bar.

get barBorderColor(): WorkbookColorInfo

Returns WorkbookColorInfo

set barBorderColor(a: WorkbookColorInfo): void

Parameters

Returns void

Returns or sets a [[WorkbookColorInfo]] object which defines the fill color of the data bar.

get barColor(): WorkbookColorInfo

Returns WorkbookColorInfo

set barColor(a: WorkbookColorInfo): void

Parameters

Returns void

Returns or sets a [[DataBarFillType]] value which determines whether the data bar is filled with a solid color or a gradient.

get barFillType(): DataBarFillType

Returns DataBarFillType

set barFillType(a: DataBarFillType): void

Parameters

Returns void

Inherited from: ThresholdConditionBase

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

get conditionType(): FormatConditionType

Returns FormatConditionType

Returns or sets a [[DataBarDirection]] value which determines the direction in which the data bar extends.

get direction(): DataBarDirection

Returns DataBarDirection

set direction(a: DataBarDirection): void

Parameters

Returns void

Returns or sets an integer value which determines the length of the longest data bar, expressed as a percentage of the cell's width.

get fillPercentMax(): number

Returns number

set fillPercentMax(a: number): void

Parameters

  • a: number

Returns void

Returns or sets an integer value which determines the length of the shortest data bar, expressed as a percentage of the cell's width.

get fillPercentMin(): number

Returns number

set fillPercentMin(a: number): void

Parameters

  • a: number

Returns void

Inherited from: ThresholdConditionBase

Returns the formula which determines the values to which this condition applies. Note: the formula should return a boolean result. When the formula is applied to cells in the region if the formula returns false then those cells will not be included in the formatting.

get formula(): Formula

Returns Formula

Returns or sets a value which determines the manner in which the longest bar is evaluated for this condition.

get maxPoint(): ConditionValue

Returns ConditionValue

Returns or sets a value which determines the manner in which the shortest bar is evaluated for this condition.

get minPoint(): ConditionValue

Returns ConditionValue

Returns a [[negativeBarFormat]] object which defines the visual attributes of negative-value data bars.

get negativeBarFormat(): NegativeBarFormat

Returns NegativeBarFormat

Inherited from: ThresholdConditionBase

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

get priority(): number

Returns number

set priority(a: number): void

Parameters

  • a: number

Returns void

Inherited from: ThresholdConditionBase

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

get regions(): ReadOnlyCollection$1<WorksheetRegion>

Returns ReadOnlyCollection$1<WorksheetRegion>

Returns or sets a boolean value indicating whether borders are displayed for both negative-value and positive-value databars.

get showBorder(): boolean

Returns boolean

set showBorder(a: boolean): void

Parameters

  • a: boolean

Returns void

Returns or sets a boolean value indicating whether the cell value is shown along with the data bar.

get showValue(): boolean

Returns boolean

set showValue(a: boolean): void

Parameters

  • a: boolean

Returns void

Inherited from: ThresholdConditionBase

Returns or 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.

get stopIfTrue(): boolean

Returns boolean

set stopIfTrue(a: boolean): void

Parameters

  • a: boolean

Returns void

Inherited from: ThresholdConditionBase

Returns a reference to the associated workbook.

get workbook(): Workbook

Returns Workbook

Inherited from: ThresholdConditionBase

Returns a reference to the associated worksheet.

get worksheet(): Worksheet

Returns Worksheet

Inherited from: ThresholdConditionBase

Sets the [[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.

setFirstPriority(): void

Returns void

Inherited from: ThresholdConditionBase

Assigns a new [[Formula]] to the [[formula]] property. Note: the formula should return a boolean result. When the formula is applied to cells in the region if the formula returns false then those cells will not be included in the formatting.

setFormula(formula: string, cellReferenceMode: CellReferenceMode): void

Parameters

  • formula: string

    The string representation of the formula.

  • cellReferenceMode: CellReferenceMode

    A [[CellReferenceMode]] value which specifies whether the 'formula' parameter should be interpreted as an A1 or R1C1 expression. This parameter is optional and defaults to null, in which case the [[Workbook.cellReferenceMode]] property is used.

Returns void

Inherited from: ThresholdConditionBase

Sets the [[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]].

setLastPriority(): void

Returns void

Inherited from: ThresholdConditionBase

Replaces the existing regions with new ones

setRegions(regionAddress: string, cellReferenceMode: CellReferenceMode | null): void

Parameters

  • regionAddress: string

    A string with one or more comma separated region address

  • cellReferenceMode: CellReferenceMode | null

    An optional cell reference mode

Returns void

Inherited from: ThresholdConditionBase

staticInit(): void

Returns void