Class DataBarFormattingRule
Represents a conditional formatting rule that displays a data bar in cells.
Inherited Members
Namespace: DRIT.Spreadsheet.ConditionalFormatting
Assembly: DRIT.Spreadsheet.dll
Syntax
public class DataBarFormattingRule : ConditionalFormattingRule
Constructors
DataBarFormattingRule(ConditionalFormatting)
Initializes a new instance of the DataBarFormattingRule class.
Declaration
public DataBarFormattingRule(ConditionalFormatting conditionalFormatting)
Parameters
| Type | Name | Description |
|---|---|---|
| ConditionalFormatting | conditionalFormatting | The conditional formatting that owns this rule. |
DataBarFormattingRule(ConditionalFormatting, SpreadsheetColor)
Initializes a new instance of the DataBarFormattingRule class with a specified color.
Declaration
public DataBarFormattingRule(ConditionalFormatting conditionalFormatting, SpreadsheetColor color)
Parameters
| Type | Name | Description |
|---|---|---|
| ConditionalFormatting | conditionalFormatting | The conditional formatting that owns this rule. |
| SpreadsheetColor | color | The color for the data bar. |
Properties
AxisColor
Specifies the color of the data bar axis.
Declaration
public SpreadsheetColor AxisColor { get; set; }
Property Value
| Type | Description |
|---|---|
| SpreadsheetColor |
AxisPosition
Specifies the axis position of the data bar.
Declaration
public DataBarAxisPosition AxisPosition { get; set; }
Property Value
| Type | Description |
|---|---|
| DataBarAxisPosition |
BarBorder
Specifies the border settings for the data bar.
Declaration
public DataBarBorder BarBorder { get; set; }
Property Value
| Type | Description |
|---|---|
| DataBarBorder |
BarFillType
Specifies the fill type of the data bar (gradient or solid). Default is Gradient.
Declaration
public DataBarFillType BarFillType { get; set; }
Property Value
| Type | Description |
|---|---|
| DataBarFillType |
Color
Specifies the color of the data bar.
Declaration
public SpreadsheetColor Color { get; set; }
Property Value
| Type | Description |
|---|---|
| SpreadsheetColor |
Direction
Specifies the direction of the data bar.
Declaration
public DataBarDirection Direction { get; set; }
Property Value
| Type | Description |
|---|---|
| DataBarDirection |
Maximum
Specifies a condition determining how the longest bar is evaluated.
Declaration
public ConditionValue Maximum { get; set; }
Property Value
| Type | Description |
|---|---|
| ConditionValue |
MaximumLength
Specifies the maximum length of the data bar as a percentage (0-100).
Declaration
public int MaximumLength { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Minimum
Specifies a condition determining how the shortest bar is evaluated.
Declaration
public ConditionValue Minimum { get; set; }
Property Value
| Type | Description |
|---|---|
| ConditionValue |
MinimumLength
Specifies the minimum length of the data bar as a percentage (0-100).
Declaration
public int MinimumLength { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
NegativeBarFormat
Specifies the negative bar format for the data bar.
Declaration
public NegativeBarFormat NegativeBarFormat { get; set; }
Property Value
| Type | Description |
|---|---|
| NegativeBarFormat |
ShowValue
Gets or sets whether to show the cell value alongside the data bar.
Declaration
public bool ShowValue { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |