[]
Specifies the axis position for a range of cells with conditional formatting as data bars.
Use this enumeration to control whether the data bar axis is hidden, positioned automatically based on positive and negative values, or fixed at the midpoint of the cell.
public enum DataBarAxisPosition
Public Enum DataBarAxisPosition
worksheet.Range["A1:A3"].Value = new object[,] { { -10 }, { 0 }, { 20 } };
IDataBar dataBar = worksheet.Range["A1:A3"].FormatConditions.AddDatabar();
dataBar.AxisPosition = DataBarAxisPosition.Midpoint;
| Name | Description |
|---|---|
| Automatic | Displays the axis at a variable position based on the ratio of the minimum negative value to the maximum positive value in the range. Positive values are displayed in a left-to-right direction. Negative values are displayed in a right-to-left direction. When all values are positive or all values are negative, no axis is displayed. |
| Midpoint | Displays the axis at the midpoint of the cell regardless of the values in the range. Positive values are displayed from left to right, and negative values are displayed from right to left. |
| None | Does not display the axis for the data bar. |