[]
        
首页
开发者学堂
文档
论坛
市场
生态机会
活动
立即试用
(Showing Draft Content)

DataBarAxisPosition

Enum Class DataBarAxisPosition

java.lang.Object
java.lang.Enum<DataBarAxisPosition>
com.grapecity.documents.excel.DataBarAxisPosition
All Implemented Interfaces:
Serializable, Comparable<DataBarAxisPosition>, Constable

public enum DataBarAxisPosition extends Enum<DataBarAxisPosition>
指定将条件格式设置为数据条的单元格区域的坐标轴位置。

使用此枚举可以控制数据条坐标轴是隐藏、根据正值和负值自动定位,还是固定在单元格中点。


 worksheet.getRange("A1:A3").setValue(new Object[][] {{-10}, {0}, {20}});
 IDataBar dataBar = worksheet.getRange("A1:A3").getFormatConditions().addDatabar();
 dataBar.setAxisPosition(DataBarAxisPosition.Midpoint);
 
  • Enum Constant Details

    • None

      public static final DataBarAxisPosition None
      不显示数据条的坐标轴。
    • Automatic

      public static final DataBarAxisPosition Automatic
      显示坐标轴在一个基于范围内最小负值与最大正值比率的可变位置。正值从左向右显示,负值从右向左显示。当所有值都是正值或都是负值时,不显示坐标轴。
    • Midpoint

      public static final DataBarAxisPosition Midpoint
      无论区域中的值如何,都在单元格中点显示坐标轴。正值从左到右显示,负值从右到左显示。
  • Method Details

    • values

      public static DataBarAxisPosition[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DataBarAxisPosition valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null