Class CartesianAxes
- java.lang.Object
-
- org.primefaces.model.charts.axes.cartesian.CartesianAxes
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CartesianCategoryAxes,CartesianLinearAxes
public abstract class CartesianAxes extends Object implements Serializable
Axes that follow a cartesian grid are known as 'Cartesian Axes'. Cartesian axes are used for line, bar, and bubble charts.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CartesianAxes()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringencode()Write the common options of cartesian axesAxesGridLinesgetGridLines()Gets the gridLinesStringgetId()Gets the idStringgetPosition()Gets the positionCartesianScaleLabelgetScaleLabel()Gets the scaleLabelbooleanisOffset()Gets the offsetbooleanisStacked()Gets the stackedvoidsetGridLines(AxesGridLines gridLines)Sets the gridLinesvoidsetId(String id)Sets the idvoidsetOffset(boolean offset)Sets the offsetvoidsetPosition(String position)Sets the positionvoidsetScaleLabel(CartesianScaleLabel scaleLabel)Sets the scaleLabelvoidsetStacked(boolean stacked)Sets the stacked
-
-
-
Method Detail
-
getPosition
public String getPosition()
Gets the position- Returns:
- position
-
setPosition
public void setPosition(String position)
Sets the position- Parameters:
position- Position of the axis in the chart. Possible values are: 'top', 'left', 'bottom', 'right'
-
isOffset
public boolean isOffset()
Gets the offset- Returns:
- offset
-
setOffset
public void setOffset(boolean offset)
Sets the offset- Parameters:
offset- If true, extra space is added to the both edges and the axis is scaled to fit into the chart area. This is set to true in the bar chart by default.
-
getId
public String getId()
Gets the id- Returns:
- id
-
setId
public void setId(String id)
Sets the id- Parameters:
id- The ID is used to link datasets and scale axes together.
-
getGridLines
public AxesGridLines getGridLines()
Gets the gridLines- Returns:
- gridLines
-
setGridLines
public void setGridLines(AxesGridLines gridLines)
Sets the gridLines- Parameters:
gridLines- theAxesGridLinesobject
-
getScaleLabel
public CartesianScaleLabel getScaleLabel()
Gets the scaleLabel- Returns:
- scaleLabel
-
setScaleLabel
public void setScaleLabel(CartesianScaleLabel scaleLabel)
Sets the scaleLabel- Parameters:
scaleLabel- theCartesianScaleLabelobject
-
isStacked
public boolean isStacked()
Gets the stacked- Returns:
- stacked
-
setStacked
public void setStacked(boolean stacked)
Sets the stacked- Parameters:
stacked- Stacked charts can be used to show how one data series is made up of a number of smaller pieces.
-
encode
public String encode() throws IOException
Write the common options of cartesian axes- Returns:
- options as JSON object
- Throws:
IOException- If an I/O error occurs
-
-