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
Used to provide DataSet objects to Line chart component.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionencode()Write the options of this dataSetGets the backgroundColorGets the borderCapStyleGets the borderColorGets the borderDashGets the borderDashOffsetGets the borderJoinStyleGets the borderWidthGets the cubicInterpolationModegetData()Gets the list of data in this dataSet.getFill()Fill the area under the line?getLabel()Gets the labelGets the pointBackgroundColorGets the pointBorderColorGets the pointBorderWidthGets the pointHitRadiusGets the pointHoverBackgroundColorGets the pointHoverBorderColorGets the pointHoverBorderWidthGets the pointHoverRadiusGets the pointRadiusGets the pointStyleGets stepped.Gets the Bézier curve tension (0 for no Bézier curves)Gets the xAxisIDGets the yAxisIDbooleanGets the showLinebooleanGets 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 cubicInterpolationModevoidSets the list of data in this dataSet.voidFill the area under the line?voidSets the labelvoidsetPointBackgroundColor(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 stepped.voidsetStepped(Object stepped) Sets the steppedvoidsetTension(Number tension) Sets the tensionvoidsetXaxisID(String xaxisID) Sets the xAxisIDvoidsetYaxisID(String yaxisID) Sets the yAxisIDMethods inherited from class org.primefaces.model.charts.ChartDataSet
isHidden, setHidden
-
Constructor Details
-
LineChartDataSet
public LineChartDataSet()
-
-
Method Details
-
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
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
Gets the label- Returns:
- label
-
setLabel
Sets the label- Parameters:
label- The label for the dataset which appears in the legend and tooltips
-
getXaxisID
Gets the xAxisID- Returns:
- xAxisID
-
setXaxisID
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
Gets the yAxisID- Returns:
- yAxisID
-
setYaxisID
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
Gets the backgroundColor- Returns:
- backgroundColor
-
setBackgroundColor
Sets the backgroundColor- Parameters:
backgroundColor- The fill color under the line.
-
getBorderColor
Gets the borderColor- Returns:
- borderColor
-
setBorderColor
Sets the borderColor- Parameters:
borderColor- The color of the line.
-
getBorderWidth
Gets the borderWidth- Returns:
- borderWidth
-
setBorderWidth
Sets the borderWidth- Parameters:
borderWidth- The width of the line in pixels.
-
getBorderDash
Gets the borderDash- Returns:
- borderDash
-
setBorderDash
Sets the borderDash- Parameters:
borderDash- Length and spacing of dashes.
-
getBorderDashOffset
Gets the borderDashOffset- Returns:
- borderDashOffset
-
setBorderDashOffset
Sets the borderDashOffset- Parameters:
borderDashOffset- Offset for line dashes.
-
getBorderCapStyle
Gets the borderCapStyle- Returns:
- borderCapStyle
-
setBorderCapStyle
Sets the borderCapStyle- Parameters:
borderCapStyle- Cap style of the line.
-
getBorderJoinStyle
Gets the borderJoinStyle- Returns:
- borderJoinStyle
-
setBorderJoinStyle
Sets the borderJoinStyle- Parameters:
borderJoinStyle- Line joint style.
-
getCubicInterpolationMode
Gets the cubicInterpolationMode- Returns:
- cubicInterpolationMode
- See Also:
-
setCubicInterpolationMode
Sets the cubicInterpolationMode- Parameters:
cubicInterpolationMode- Algorithm used to interpolate a smooth curve from the discrete data points.- See Also:
-
getFill
Fill the area under the line?- Returns:
- fill
- See Also:
-
setFill
Fill the area under the line?- Parameters:
fill- Fill the area under the line?- See Also:
-
getTension
Gets the Bézier curve tension (0 for no Bézier curves)- Returns:
- tension
-
setTension
Sets the tension- Parameters:
tension- Bézier curve tension (0 for no Bézier curves)
-
getPointBackgroundColor
Gets the pointBackgroundColor- Returns:
- pointBackgroundColor
-
setPointBackgroundColor
Sets the pointBackgroundColor- Parameters:
pointBackgroundColor- The fill color for points.
-
getPointBorderColor
Gets the pointBorderColor- Returns:
- pointBorderColor
-
setPointBorderColor
Sets the pointBorderColor- Parameters:
pointBorderColor- The border color for points.
-
getPointBorderWidth
Gets the pointBorderWidth- Returns:
- pointBorderWidth
-
setPointBorderWidth
Sets the pointBorderWidth- Parameters:
pointBorderWidth- The width of the point border in pixels.
-
getPointRadius
Gets the pointRadius- Returns:
- pointRadius
-
setPointRadius
Sets the pointRadius- Parameters:
pointRadius- The radius of the point shape. If set to 0, the point is not rendered.
-
getPointStyle
Gets the pointStyle- Returns:
- pointStyle
-
setPointStyle
Sets the pointStyle- Parameters:
pointStyle- Style of the point.
-
getPointHitRadius
Gets the pointHitRadius- Returns:
- pointHitRadius
-
setPointHitRadius
Sets the pointHitRadius- Parameters:
pointHitRadius- The pixel size of the non-displayed point that reacts to mouse events.
-
getPointHoverBackgroundColor
Gets the pointHoverBackgroundColor- Returns:
- pointHoverBackgroundColor
-
setPointHoverBackgroundColor
Sets the pointHoverBackgroundColor- Parameters:
pointHoverBackgroundColor- Point background color when hovered.
-
getPointHoverBorderColor
Gets the pointHoverBorderColor- Returns:
- pointHoverBorderColor
-
setPointHoverBorderColor
Sets the pointHoverBorderColor- Parameters:
pointHoverBorderColor- Point border color when hovered.
-
getPointHoverBorderWidth
Gets the pointHoverBorderWidth- Returns:
- pointHoverBorderWidth
-
setPointHoverBorderWidth
Sets the pointHoverBorderWidth- Parameters:
pointHoverBorderWidth- Border width of point when hovered.
-
getPointHoverRadius
Gets the pointHoverRadius- Returns:
- pointHoverRadius
-
setPointHoverRadius
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
Gets stepped. true to show the line as a stepped line (tension will be ignored).- Returns:
- stepped
- See Also:
-
setStepped
Sets the stepped- Parameters:
stepped- If the line is shown as a stepped line.- See Also:
-
encode
Write the options of this dataSet- Overrides:
encodein classChartDataSet- Returns:
- options as JSON object
- Throws:
IOException- If an I/O error occurs
-