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

SparkScale

Enum Class SparkScale

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

public enum SparkScale extends Enum<SparkScale>
指定迷你图垂直轴的最小值或最大值如何相对于组中的其他迷你图进行缩放。

将此枚举与迷你图组的垂直轴设置一起使用,可以控制所有迷你图是否共享同一比例、每个迷你图是否使用其自己计算出的比例,或者是否应用自定义轴值。


 worksheet.getRange("A1:C3").setValue(new Object[][] {
     {2, 4, 6}, {3, 9, 1}, {5, 7, 8}
 });
 ISparklineGroup group = worksheet.getRange("D1:D3").getSparklineGroups().add(SparkType.Line, "A1:C3");
 group.getAxes().getVertical().setMinScaleType(SparkScale.SparkScaleGroup);
 group.getAxes().getVertical().setMaxScaleType(SparkScale.SparkScaleCustom);
 group.getAxes().getVertical().setCustomMaxScaleValue(10);
 
  • Enum Constant Details

    • SparkScaleGroup

      public static final SparkScale SparkScaleGroup
      指定组中所有迷你图垂直轴的最小值或最大值具有相同的值。
    • SparkScaleSingle

      public static final SparkScale SparkScaleSingle
      指定分组中每个迷你图垂直轴的最小值或最大值自动设置为它自己的计算值。
    • SparkScaleCustom

      public static final SparkScale SparkScaleCustom
      指定迷你图垂直轴的最小值或最大值为用户定义的值。
  • Method Details

    • values

      public static SparkScale[] 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 SparkScale 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