Package org.primefaces.model.charts.line
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LineChartDataSet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringencode()Write the options of this dataSetStringgetBackgroundColor()Gets the backgroundColorStringgetBorderCapStyle()Gets the borderCapStyleStringgetBorderColor()Gets the borderColorList<Number>getBorderDash()Gets the borderDashNumbergetBorderDashOffset()Gets the borderDashOffsetStringgetBorderJoinStyle()Gets the borderJoinStyleNumbergetBorderWidth()Gets the borderWidthStringgetCubicInterpolationMode()Gets the cubicInterpolationModeList<Object>getData()Gets the list of data in this dataSet.ObjectgetFill()Gets the fillStringgetLabel()Gets the labelNumbergetLineTension()Gets the lineTensionObjectgetPointBackgroundColor()Gets the pointBackgroundColorObjectgetPointBorderColor()Gets the pointBorderColorObjectgetPointBorderWidth()Gets the pointBorderWidthObjectgetPointHitRadius()Gets the pointHitRadiusObjectgetPointHoverBackgroundColor()Gets the pointHoverBackgroundColorObjectgetPointHoverBorderColor()Gets the pointHoverBorderColorObjectgetPointHoverBorderWidth()Gets the pointHoverBorderWidthObjectgetPointHoverRadius()Gets the pointHoverRadiusObjectgetPointRadius()Gets the pointRadiusObjectgetPointStyle()Gets the pointStyleObjectgetSteppedLine()Gets the steppedLineStringgetXaxisID()Gets the xAxisIDStringgetYaxisID()Gets the yAxisIDbooleanisShowLine()Gets the showLinebooleanisSpanGaps()Gets the spanGapsvoidsetBackgroundColor(String backgroundColor)Sets the backgroundColorvoidsetBorderCapStyle(String borderCapStyle)Sets the borderCapStylevoidsetBorderColor(String borderColor)Sets the borderColorvoidsetBorderDash(List<Number> borderDash)Sets the borderDashvoidsetBorderDashOffset(Number borderDashOffset)Sets the borderDashOffsetvoidsetBorderJoinStyle(String borderJoinStyle)Sets the borderJoinStylevoidsetBorderWidth(Number borderWidth)Sets the borderWidthvoidsetCubicInterpolationMode(String cubicInterpolationMode)Sets the cubicInterpolationModevoidsetData(List<Object> data)Sets the list of data in this dataSet.voidsetFill(Object fill)Sets the fillvoidsetLabel(String label)Sets the labelvoidsetLineTension(Number lineTension)Sets the lineTensionvoidsetPointBackgroundColor(Object pointBackgroundColor)Sets the pointBackgroundColorvoidsetPointBorderColor(Object pointBorderColor)Sets the pointBorderColorvoidsetPointBorderWidth(Object pointBorderWidth)Sets the pointBorderWidthvoidsetPointHitRadius(Object pointHitRadius)Sets the pointHitRadiusvoidsetPointHoverBackgroundColor(Object pointHoverBackgroundColor)Sets the pointHoverBackgroundColorvoidsetPointHoverBorderColor(Object pointHoverBorderColor)Sets the pointHoverBorderColorvoidsetPointHoverBorderWidth(Object pointHoverBorderWidth)Sets the pointHoverBorderWidthvoidsetPointHoverRadius(Object pointHoverRadius)Sets the pointHoverRadiusvoidsetPointRadius(Object pointRadius)Sets the pointRadiusvoidsetPointStyle(Object pointStyle)Sets the pointStylevoidsetShowLine(boolean showLine)Sets the showLinevoidsetSpanGaps(boolean spanGaps)Sets the spanGapsvoidsetSteppedLine(Object steppedLine)Sets the steppedLinevoidsetXaxisID(String xaxisID)Sets the xAxisIDvoidsetYaxisID(String yaxisID)Sets the yAxisID-
Methods inherited from class org.primefaces.model.charts.ChartDataSet
isHidden, setHidden
-
-
-
-
Method Detail
-
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.
-
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
-
setCubicInterpolationMode
public void setCubicInterpolationMode(String cubicInterpolationMode)
Sets the cubicInterpolationMode- Parameters:
cubicInterpolationMode- Algorithm used to interpolate a smooth curve from the discrete data points.
-
getFill
public Object getFill()
Gets the fill- Returns:
- fill
-
setFill
public void setFill(Object fill)
Sets the fill- Parameters:
fill- How to fill the area under the line.
-
getLineTension
public Number getLineTension()
Gets the lineTension- Returns:
- lineTension
-
setLineTension
public void setLineTension(Number lineTension)
Sets the lineTension- Parameters:
lineTension- Bezier curve tension of the line. Set to 0 to draw straightlines. This option is ignored if monotone cubic interpolation is used.
-
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 the spanGaps- 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
-
getSteppedLine
public Object getSteppedLine()
Gets the steppedLine- Returns:
- steppedLine
-
setSteppedLine
public void setSteppedLine(Object steppedLine)
Sets the steppedLine- Parameters:
steppedLine- If the line is shown as a stepped line.
-
encode
public String encode() throws IOException
Write the options of this dataSet- Overrides:
encodein classChartDataSet- Returns:
- options as JSON object
- Throws:
IOException- If an I/O error occurs
-
-