Enum Class SparklineType

java.lang.Object
java.lang.Enum<SparklineType>
com.jbstrap.ui.components.sparkline.SparklineType
All Implemented Interfaces:
Serializable, Comparable<SparklineType>, Constable

public enum SparklineType extends Enum<SparklineType>
Sparkline types.
Since:
4.0
Author:
JBStrap
  • Enum Constant Details

    • LINE_CHART

      public static final SparklineType LINE_CHART
      Line chart
    • AREA_CHART

      public static final SparklineType AREA_CHART
      Area chart
    • BAR_CHART

      public static final SparklineType BAR_CHART
      Bar chart
    • TRISTATE_CHART

      public static final SparklineType TRISTATE_CHART
      Tristate chart
    • DISCRETE_CHART

      public static final SparklineType DISCRETE_CHART
      Discrete chart
    • BULLET_GRAPH

      public static final SparklineType BULLET_GRAPH
      Bullet chart
    • PIE_CHART

      public static final SparklineType PIE_CHART
      Pie chart
    • BOX_PLOT

      public static final SparklineType BOX_PLOT
      Box plot chart
  • Method Details

    • values

      public static SparklineType[] 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 SparklineType 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
    • getType

      public String getType()
      Returns:
      JavaScript type name for the sparkline type
    • getWidthParamName

      protected String getWidthParamName()
      Returns:
      JavaScript parameter name for the width parameter
    • getColorParamNames

      protected List<String> getColorParamNames()
      Returns:
      Color Color parameter name
    • getNegativecolorParamName

      protected String getNegativecolorParamName()
      Returns:
      JavaScript parameter name for the negative color parameter
    • fromName

      protected static SparklineType fromName(String sparklineType)
      Parameters:
      sparklineType - Type name used to get the sparkline type
      Returns:
      Sparkline type for the corresponding name or null if no sparkline type is associated with the specified name
    • fromTypeName

      protected static SparklineType fromTypeName(String typeName)
      Parameters:
      typeName - Sparkline type
      Returns:
      Sparkline type for the corresponding name or null if no sparkline type is associated with the specified name
    • getDefaultColor

      protected String getDefaultColor()
      Returns:
      Default sparkline type color
    • getDefaultNegativetColor

      protected String getDefaultNegativetColor()
      Returns:
      Default color for negative values