Back to Devexpress

DataBarConditionalFormatting.AxisPosition Property

officefileapi-devexpress-dot-spreadsheet-dot-databarconditionalformatting-23b08f6c.md

latest4.2 KB
Original Source

DataBarConditionalFormatting.AxisPosition Property

Gets or sets the axis position in a cell.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
ConditionalFormattingDataBarAxisPosition AxisPosition { get; set; }
vb
Property AxisPosition As ConditionalFormattingDataBarAxisPosition

Property Value

TypeDescription
ConditionalFormattingDataBarAxisPosition

One of the ConditionalFormattingDataBarAxisPosition enumeration values.

|

Available values:

NameDescription
None

No axis is displayed. Negative and positive bars are displayed in the same direction.

| | Automatic |

Displays the axis at a variable position based on negative and positive values.

| | Middle |

Displays the axis at the midpoint of the cell.

|

Remarks

The axis of data bars is displayed only when there are negative values in the range of cell to which the data bar conditional formatting rule is applied. The default value for the AxisPosition property is Automatic when the axis is displayed at a variable position based on the ratio of the minimum negative value to the maximum positive value in the range.

The following code snippets (auto-collected from DevExpress Examples) contain references to the AxisPosition property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

spreadsheet-document-api-apply-conditional-formatting-to-cell-range/VB/ConditionalFormatting_Example/SpreadsheetActions/ConditionalFormatting.vb#L291

vb
' Set the axis position to display the axis in the middle of the cell.
cfRule1.AxisPosition = ConditionalFormattingDataBarAxisPosition.Middle
' Set the axis color to dark blue.

winforms-spreadsheet-apply-conditional-formatting-to-a-range-of-cells/VB/SpreadsheetControl/SpreadsheetActions/ConditionalFormatting.vb#L288

vb
' Set the axis position to display the axis in the middle of the cell.
cfRule1.AxisPosition = ConditionalFormattingDataBarAxisPosition.Middle
' Set the axis color to dark blue.

wpf-spreadsheet-how-to-apply-conditional-formatting-to-a-range-of-cells/VB/ConditionalFormatting_WPF_Examples/SpreadsheetActions/ConditionalFormatting.vb#L285

vb
' Set the axis position to display the axis in the middle of the cell.
cfRule1.AxisPosition = ConditionalFormattingDataBarAxisPosition.Middle
' Set the axis color to dark blue.

See Also

DataBarConditionalFormatting Interface

DataBarConditionalFormatting Members

DevExpress.Spreadsheet Namespace