Class AreaSeries

All Implemented Interfaces:
AdvancedMarker<AreaSeries>, ColorizedSeries<AreaSeries>

public class AreaSeries extends AxesBaseSeries implements AdvancedMarker<AreaSeries>, ColorizedSeries<AreaSeries>
Series object to be displayed on an area chart.
Since:
4.0
Author:
JBStrap
  • Field Details

  • Constructor Details

    • AreaSeries

      public AreaSeries(String title)
      Creates a series object to be displayed on an area chart.
      Parameters:
      title - Series name (required)
      Throws:
      NullPointerException - Thrown if the specified series name is null
    • AreaSeries

      public AreaSeries(String title, String dataColumn)
      Creates a series object to be displayed on an area chart.
      Parameters:
      title - Series name (required)
      dataColumn - The name of the data column that contains the displayed series in the DataDescriptor
      Throws:
      NullPointerException - Thrown if the specified series name is null
  • Method Details

    • setCurveType

      public AreaSeries setCurveType(CurveType type)
      Sets how the area delimiter is displayed on the area chart. Default value: CurveType.SMOOTH, the delimiter appears smoothed.
      Parameters:
      type - Line type setting Available types are listed in the enum CurveType. If null is specified, the line is displayed using the default setting CurveType.SMOOTH, that is, smoothed.
      Returns:
      Series object
    • getCurveType

      public CurveType getCurveType()
      Gets the chart’s area delimiter line type.
      Returns:
      Chart area delimiter line type
    • setLineWidth

      public AreaSeries setLineWidth(int lineWidth)
      Sets the line width of the area delimiter. The default delimiter line width is 3 pixels.
      Parameters:
      lineWidth - Delimiter line width in pixels
      Returns:
      Series object
    • getLineWidth

      public int getLineWidth()
      Gets the delimiter line width.
      Returns:
      Delimiter line width
    • setDashArray

      public AreaSeries setDashArray(String dashArray)
      Sets the line dash type. The method requires a number sequence (unlimited number of items) as parameter. The first item always determines the line section length, whereas the second item represents a space between two line sections. E.g. [20,20] means that a 20-pixel line section is followed by 20 pixels of space, thereby creating a dashed line.
      Parameters:
      dashArray - The number sequence in the String format
      Returns:
      Series object
    • getDashArray

      public String getDashArray()
      Gets the dash array
      Returns:
      The dash arra or null if not set
    • setGradient

      public AreaSeries setGradient(boolean gradient)
      Sets if the area chart should be filled with a solid color or a gradient. The default fill setting is a solid fill.
      Parameters:
      gradient - If true is specified, the area is filled with a color gradient, otherwise with a solid color
      Returns:
      Series object
    • isGradient

      public boolean isGradient()
      Checks if the area chart is filled with a color gradient.
      Returns:
      If true is specified, the area is filled with a color gradient, otherwise with a solid color
    • setShowLine

      public AreaSeries setShowLine(boolean showLine)
      Set whether the boundary line is visible on the area chart. The boundary line is visible by default.
      Parameters:
      showLine - If true is set, the boundary line is visible, otherwise it is not
      Returns:
      Series object
    • isShowLine

      public boolean isShowLine()
      Determine if the boundary line is visible on the area chart
      Returns:
      If true, the boundary line is visible, otherwise it is not
    • fromSeries

      public static AreaSeries fromSeries(Series series)
      Creates an AreaSeries object based on an other Series object.
      Parameters:
      series - The series object used to create the area series All of the specified series object’s settings are taken over by the area series. If the specified series does not have the attributes necessary for the area series, the area series is created using default values.
      Returns:
      The created area series object