DataBar

DataBar class

Describe the DataBar conditional formatting rule. This conditional formatting rule displays a gradated data bar in the range of cells.

Properties

NameTypeDescription
AxisColorColorGets the color of the axis for cells with conditional formatting as data bars.
AxisPositionintGets or sets the position of the axis of the data bars specified by a conditional formatting rule. The value of the prop
BarFillTypeintGets or sets how a data bar is filled with color. The value of the property is DataBarFillType integer constant.
DirectionintGets or sets the direction the databar is displayed. The value of the property is TextDirectionType integer constant.
BarBorderDataBarBorderGets an object that specifies the border of a data bar.
NegativeBarFormatNegativeBarFormatGets the NegativeBarFormat object associated with a data bar conditional formatting rule.
MinCfvoConditionalFormattingValueGet or set this DataBar’s min value object. Cannot set null or CFValueObject with type FormatConditionValueType.Max to i
MaxCfvoConditionalFormattingValueGet or set this DataBar’s max value object. Cannot set null or CFValueObject with type FormatConditionValueType.Min to i
ColorColorGet or set this DataBar’s Color.
MinLengthintRepresents the min length of data bar .
MaxLengthintRepresents the max length of data bar .
ShowValuebooleanGet or set the flag indicating whether to show the values of the cells on which this data bar is applied. Default value

Methods

NameDescription
toImageRender data bar in cell to image byte array.

DataBar.AxisColor property

Gets the color of the axis for cells with conditional formatting as data bars.

Type: Color

DataBar.AxisPosition property

Gets or sets the position of the axis of the data bars specified by a conditional formatting rule. The value of the property is DataBarAxisPosition integer constant.

Type: int

DataBar.BarFillType property

Gets or sets how a data bar is filled with color. The value of the property is DataBarFillType integer constant.

Type: int

DataBar.Direction property

Gets or sets the direction the databar is displayed. The value of the property is TextDirectionType integer constant.

Type: int

DataBar.BarBorder property

Gets an object that specifies the border of a data bar.

Type: DataBarBorder

DataBar.NegativeBarFormat property

Gets the NegativeBarFormat object associated with a data bar conditional formatting rule.

Type: NegativeBarFormat

DataBar.MinCfvo property

Get or set this DataBar’s min value object. Cannot set null or CFValueObject with type FormatConditionValueType.Max to it.

Type: ConditionalFormattingValue

DataBar.MaxCfvo property

Get or set this DataBar’s max value object. Cannot set null or CFValueObject with type FormatConditionValueType.Min to it.

Type: ConditionalFormattingValue

DataBar.Color property

Get or set this DataBar’s Color.

Type: Color

DataBar.MinLength property

Represents the min length of data bar .

Type: int

DataBar.MaxLength property

Represents the max length of data bar .

Type: int

DataBar.ShowValue property

Get or set the flag indicating whether to show the values of the cells on which this data bar is applied. Default value is true.

Type: boolean

toImage(cell, imgOpts)

Render data bar in cell to image byte array.

ParameterTypeDescription
cellCellIndicate the data bar in which cell to be rendered
imgOptsImageOrPrintOptionsImageOrPrintOptions contains some property of output image