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

SparkType

Enum Class SparkType

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

public enum SparkType extends Enum<SparkType>
指定迷你图类型。

将此枚举与 ISparklineGroups 一起使用,可以为区域创建折线、柱形或盈亏迷你图。ColumnStacked100 值表示盈亏迷你图。


 worksheet.getRange("A1:C3").setValue(new Object[][] {
     {1, 3, 2},
     {4, 2, 5},
     {3, 6, 4}
 });
 worksheet.getRange("D1:D3").getSparklineGroups().add(SparkType.Line, "A1:C3");
 
  • Enum Constant Details

    • Line

      public static final SparkType Line
      指定一个折线图小图表。
    • Column

      public static final SparkType Column
      指定一个柱状图迷你图。
    • ColumnStacked100

      public static final SparkType ColumnStacked100
      指定盈亏迷你图。

      此类型将每个数据点显示为轴上方或下方大小相等的柱形,用于指示正值或负值。

  • Method Details

    • values

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