Class LineSeries

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

public class LineSeries extends AxesBaseSeries implements AdvancedMarker<LineSeries>, ColorizedSeries<LineSeries>
Series object to be used on a line chart.
Since:
4.0
Author:
JBStrap
  • Field Details

  • Constructor Details

    • LineSeries

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

      public LineSeries(String title, String dataColumn)
      Creates a series object to be displayed on a line chart.
      Parameters:
      title - Series title (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 LineSeries setCurveType(CurveType type)
      Sets the line chart’s line type. By default, the line chart is displayed with a smoothed line CurveType.SMOOTH setting.
      Parameters:
      type - Line type setting Available types are listed in the enum CurveType. If null is specified, the chart’s line is displayed by default as a smoothed line.
      Returns:
      Series object
    • getCurveType

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

      public LineSeries setLineWidth(int lineWidth)
      Sets the chart’s line width. The default line width setting is 3 pixels.
      Parameters:
      lineWidth - Line chart width in pixels
      Returns:
      Series object
    • getLineWidth

      public int getLineWidth()
      Gets the chart’s line width.
      Returns:
      Chart line width in pixels
    • setDashArray

      public LineSeries 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
    • fromSeries

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