DataBar module

class DataBar.DataBar

Bases: SpireObject

Represents a data bar conditional formatting rule in an Excel worksheet.

This class provides properties and methods for configuring data bar conditional formatting, which displays a colored bar in a cell where the length of the bar represents the value in the cell relative to other values in the selected range. It allows for customizing appearance settings such as colors, borders, axis position, and fill types.

property AxisColor: Color

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

property AxisPosition: DataBarAxisPosition

Gets or sets the position of the axis of the data bars specified by a conditional formatting rule.

property BarBorder: DataBarBorder

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

property BarColor: Color

Gets or sets the color of the bar in a data bar condition format.

property BarFillType: DataBarFillType

Gets or sets the fill type for the data bar.

This property determines how the data bar is filled with color, such as solid fill or gradient fill.

Returns:

An enumeration value representing the fill type of the data bar.

Return type:

DataBarFillType

property Direction: TextDirectionType

Gets or sets the direction the databar is displayed.

property MaxPoint: ConditionValue

The longest bar is evaluated for a data bar conditional format.

property MinPoint: ConditionValue

The shortest bar is evaluated for a data bar conditional format.

property NegativeBarFormat: NegativeBarFormat

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

property PercentMax: int

Gets or sets a value that specifies the length of the longest data bar as a percentage of cell width.

property PercentMin: int

Gets or sets a value that specifies the length of the shortest data bar as a percentage of cell width.

property ShowValue: bool

Gets or sets a Boolean value that specifies if the value in the cell is displayed.