
## DataBar class

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

## Methods

| Name | Description |
| --- | --- |
| [getAxisColor()](#getaxiscolor) | Gets the color of the axis for cells with conditional formatting as data bars. |
| [getAxisPosition()](#getaxisposition) | Gets or sets the position of the axis of the data bars specified by a conditional formatting rule. The value of the prop |
| [getBarBorder()](#getbarborder) | Gets an object that specifies the border of a data bar. |
| [getBarFillType()](#getbarfilltype) | Gets or sets how a data bar is filled with color. The value of the property is DataBarFillType integer constant. |
| [getColor()](#getcolor) | Get or set this DataBar's Color. |
| [getDirection()](#getdirection) | Gets or sets the direction the databar is displayed. The value of the property is TextDirectionType integer constant. |
| [getMaxCfvo()](#getmaxcfvo) | Get or set this DataBar's max value object. Cannot set null or CFValueObject with type FormatConditionValueType.Min to i |
| [getMaxLength()](#getmaxlength) | Represents the max length of data bar . |
| [getMinCfvo()](#getmincfvo) | Get or set this DataBar's min value object. Cannot set null or CFValueObject with type FormatConditionValueType.Max to i |
| [getMinLength()](#getminlength) | Represents the min length of data bar . |
| [getNegativeBarFormat()](#getnegativebarformat) | Gets the NegativeBarFormat object associated with a data bar conditional formatting rule. |
| [getShowValue()](#getshowvalue) | Get or set the flag indicating whether to show the values of the cells on which this data bar is applied. Default value  |
| [setAxisColor()](#setaxiscolor) | Gets the color of the axis for cells with conditional formatting as data bars. |
| [setAxisPosition()](#setaxisposition) | Gets or sets the position of the axis of the data bars specified by a conditional formatting rule. The value of the prop |
| [setBarFillType()](#setbarfilltype) | Gets or sets how a data bar is filled with color. The value of the property is DataBarFillType integer constant. |
| [setColor()](#setcolor) | Get or set this DataBar's Color. |
| [setDirection()](#setdirection) | Gets or sets the direction the databar is displayed. The value of the property is TextDirectionType integer constant. |
| [setMaxLength()](#setmaxlength) | Represents the max length of data bar . |
| [setMinLength()](#setminlength) | Represents the min length of data bar . |
| [setShowValue()](#setshowvalue) | Get or set the flag indicating whether to show the values of the cells on which this data bar is applied. Default value  |
| [toImage(cell, imgOpts)](#toimage) | Render data bar in cell to image byte array. |

### getAxisColor() {#getaxiscolor}

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

### getAxisPosition() {#getaxisposition}

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.

### getBarBorder() {#getbarborder}

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

### getBarFillType() {#getbarfilltype}

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

### getColor() {#getcolor}

Get or set this DataBar's Color.

### getDirection() {#getdirection}

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

### getMaxCfvo() {#getmaxcfvo}

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

### getMaxLength() {#getmaxlength}

Represents the max length of data bar .

### getMinCfvo() {#getmincfvo}

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

### getMinLength() {#getminlength}

Represents the min length of data bar .

### getNegativeBarFormat() {#getnegativebarformat}

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

### getShowValue() {#getshowvalue}

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.

### setAxisColor() {#setaxiscolor}

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

### setAxisPosition() {#setaxisposition}

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.

### setBarFillType() {#setbarfilltype}

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

### setColor() {#setcolor}

Get or set this DataBar's Color.

### setDirection() {#setdirection}

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

### setMaxLength() {#setmaxlength}

Represents the max length of data bar .

### setMinLength() {#setminlength}

Represents the min length of data bar .

### setShowValue() {#setshowvalue}

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.

### toImage(cell, imgOpts) {#toimage}

Render data bar in cell to image byte array.

| Parameter | Type | Description |
| --- | --- | --- |
| cell | Cell | Indicate the data bar in which cell to be rendered |
| imgOpts | ImageOrPrintOptions | ImageOrPrintOptions contains some property of output image |

**Returns:** Array of byte — `Array of byte`
