Class LineChartDataSet

java.lang.Object
org.primefaces.model.charts.ChartDataSet
org.primefaces.model.charts.line.LineChartDataSet
All Implemented Interfaces:
Serializable

public class LineChartDataSet extends ChartDataSet
Used to provide DataSet objects to Line chart component.
See Also:
  • Constructor Details

    • LineChartDataSet

      public LineChartDataSet()
  • Method Details

    • getData

      public List<Object> getData()
      Gets the list of data in this dataSet. Can either be a Number or a type of ChartJs Point.
      Returns:
      List<Object> list of data
    • setData

      public void setData(List<Object> data)
      Sets the list of data in this dataSet. Can either be a Number or a type of ChartJs Point.
      Parameters:
      data - List<Object> list of data
    • getLabel

      public String getLabel()
      Gets the label
      Returns:
      label
    • setLabel

      public void setLabel(String label)
      Sets the label
      Parameters:
      label - The label for the dataset which appears in the legend and tooltips
    • getXaxisID

      public String getXaxisID()
      Gets the xAxisID
      Returns:
      xAxisID
    • setXaxisID

      public void setXaxisID(String xaxisID)
      Sets the xAxisID
      Parameters:
      xaxisID - The ID of the x axis to plot this dataset on. If not specified, this defaults to the ID of the first found x axis
    • getYaxisID

      public String getYaxisID()
      Gets the yAxisID
      Returns:
      yAxisID
    • setYaxisID

      public void setYaxisID(String yaxisID)
      Sets the yAxisID
      Parameters:
      yaxisID - The ID of the y axis to plot this dataset on. If not specified, this defaults to the ID of the first found y axis.
    • getBackgroundColor

      public String getBackgroundColor()
      Gets the backgroundColor
      Returns:
      backgroundColor
    • setBackgroundColor

      public void setBackgroundColor(String backgroundColor)
      Sets the backgroundColor
      Parameters:
      backgroundColor - The fill color under the line.
    • getBorderColor

      public String getBorderColor()
      Gets the borderColor
      Returns:
      borderColor
    • setBorderColor

      public void setBorderColor(String borderColor)
      Sets the borderColor
      Parameters:
      borderColor - The color of the line.
    • getBorderWidth

      public Number getBorderWidth()
      Gets the borderWidth
      Returns:
      borderWidth
    • setBorderWidth

      public void setBorderWidth(Number borderWidth)
      Sets the borderWidth
      Parameters:
      borderWidth - The width of the line in pixels.
    • getBorderDash

      public List<Number> getBorderDash()
      Gets the borderDash
      Returns:
      borderDash
    • setBorderDash

      public void setBorderDash(List<Number> borderDash)
      Sets the borderDash
      Parameters:
      borderDash - Length and spacing of dashes.
    • getBorderDashOffset

      public Number getBorderDashOffset()
      Gets the borderDashOffset
      Returns:
      borderDashOffset
    • setBorderDashOffset

      public void setBorderDashOffset(Number borderDashOffset)
      Sets the borderDashOffset
      Parameters:
      borderDashOffset - Offset for line dashes.
    • getBorderCapStyle

      public String getBorderCapStyle()
      Gets the borderCapStyle
      Returns:
      borderCapStyle
    • setBorderCapStyle

      public void setBorderCapStyle(String borderCapStyle)
      Sets the borderCapStyle
      Parameters:
      borderCapStyle - Cap style of the line.
    • getBorderJoinStyle

      public String getBorderJoinStyle()
      Gets the borderJoinStyle
      Returns:
      borderJoinStyle
    • setBorderJoinStyle

      public void setBorderJoinStyle(String borderJoinStyle)
      Sets the borderJoinStyle
      Parameters:
      borderJoinStyle - Line joint style.
    • getCubicInterpolationMode

      public String getCubicInterpolationMode()
      Gets the cubicInterpolationMode
      Returns:
      cubicInterpolationMode
      See Also:
    • setCubicInterpolationMode

      public void setCubicInterpolationMode(String cubicInterpolationMode)
      Sets the cubicInterpolationMode
      Parameters:
      cubicInterpolationMode - Algorithm used to interpolate a smooth curve from the discrete data points.
      See Also:
    • getFill

      public Object getFill()
      Fill the area under the line?
      Returns:
      fill
      See Also:
    • setFill

      public void setFill(Object fill)
      Fill the area under the line?
      Parameters:
      fill - Fill the area under the line?
      See Also:
    • getTension

      public Number getTension()
      Gets the Bézier curve tension (0 for no Bézier curves)
      Returns:
      tension
    • setTension

      public void setTension(Number tension)
      Sets the tension
      Parameters:
      tension - Bézier curve tension (0 for no Bézier curves)
    • getPointBackgroundColor

      public Object getPointBackgroundColor()
      Gets the pointBackgroundColor
      Returns:
      pointBackgroundColor
    • setPointBackgroundColor

      public void setPointBackgroundColor(Object pointBackgroundColor)
      Sets the pointBackgroundColor
      Parameters:
      pointBackgroundColor - The fill color for points.
    • getPointBorderColor

      public Object getPointBorderColor()
      Gets the pointBorderColor
      Returns:
      pointBorderColor
    • setPointBorderColor

      public void setPointBorderColor(Object pointBorderColor)
      Sets the pointBorderColor
      Parameters:
      pointBorderColor - The border color for points.
    • getPointBorderWidth

      public Object getPointBorderWidth()
      Gets the pointBorderWidth
      Returns:
      pointBorderWidth
    • setPointBorderWidth

      public void setPointBorderWidth(Object pointBorderWidth)
      Sets the pointBorderWidth
      Parameters:
      pointBorderWidth - The width of the point border in pixels.
    • getPointRadius

      public Object getPointRadius()
      Gets the pointRadius
      Returns:
      pointRadius
    • setPointRadius

      public void setPointRadius(Object pointRadius)
      Sets the pointRadius
      Parameters:
      pointRadius - The radius of the point shape. If set to 0, the point is not rendered.
    • getPointStyle

      public Object getPointStyle()
      Gets the pointStyle
      Returns:
      pointStyle
    • setPointStyle

      public void setPointStyle(Object pointStyle)
      Sets the pointStyle
      Parameters:
      pointStyle - Style of the point.
    • getPointHitRadius

      public Object getPointHitRadius()
      Gets the pointHitRadius
      Returns:
      pointHitRadius
    • setPointHitRadius

      public void setPointHitRadius(Object pointHitRadius)
      Sets the pointHitRadius
      Parameters:
      pointHitRadius - The pixel size of the non-displayed point that reacts to mouse events.
    • getPointHoverBackgroundColor

      public Object getPointHoverBackgroundColor()
      Gets the pointHoverBackgroundColor
      Returns:
      pointHoverBackgroundColor
    • setPointHoverBackgroundColor

      public void setPointHoverBackgroundColor(Object pointHoverBackgroundColor)
      Sets the pointHoverBackgroundColor
      Parameters:
      pointHoverBackgroundColor - Point background color when hovered.
    • getPointHoverBorderColor

      public Object getPointHoverBorderColor()
      Gets the pointHoverBorderColor
      Returns:
      pointHoverBorderColor
    • setPointHoverBorderColor

      public void setPointHoverBorderColor(Object pointHoverBorderColor)
      Sets the pointHoverBorderColor
      Parameters:
      pointHoverBorderColor - Point border color when hovered.
    • getPointHoverBorderWidth

      public Object getPointHoverBorderWidth()
      Gets the pointHoverBorderWidth
      Returns:
      pointHoverBorderWidth
    • setPointHoverBorderWidth

      public void setPointHoverBorderWidth(Object pointHoverBorderWidth)
      Sets the pointHoverBorderWidth
      Parameters:
      pointHoverBorderWidth - Border width of point when hovered.
    • getPointHoverRadius

      public Object getPointHoverRadius()
      Gets the pointHoverRadius
      Returns:
      pointHoverRadius
    • setPointHoverRadius

      public void setPointHoverRadius(Object pointHoverRadius)
      Sets the pointHoverRadius
      Parameters:
      pointHoverRadius - The radius of the point when hovered.
    • isShowLine

      public boolean isShowLine()
      Gets the showLine
      Returns:
      showLine
    • setShowLine

      public void setShowLine(boolean showLine)
      Sets the showLine
      Parameters:
      showLine - If false, the line is not drawn for this dataset.
    • isSpanGaps

      public boolean isSpanGaps()
      Gets the spanGaps
      Returns:
      spanGaps
    • setSpanGaps

      public void setSpanGaps(boolean spanGaps)
      Sets stepped. true to show the line as a stepped line (tension will be ignored).
      Parameters:
      spanGaps - If true, lines will be drawn between points with no or null data. If false, points with NaN data will create a break in the line
    • getStepped

      public Object getStepped()
      Gets stepped. true to show the line as a stepped line (tension will be ignored).
      Returns:
      stepped
      See Also:
    • setStepped

      public void setStepped(Object stepped)
      Sets the stepped
      Parameters:
      stepped - If the line is shown as a stepped line.
      See Also:
    • encode

      public String encode() throws IOException
      Write the options of this dataSet
      Overrides:
      encode in class ChartDataSet
      Returns:
      options as JSON object
      Throws:
      IOException - If an I/O error occurs