Class CartesianAxes
java.lang.Object
org.primefaces.model.charts.axes.cartesian.CartesianAxes
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CartesianCategoryAxes,CartesianLinearAxes
Axes that follow a cartesian grid are known as 'Cartesian Axes'.
Cartesian axes are used for line, bar, and bubble charts.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionencode()Write the common options of cartesian axesgetGrid()Gets the gridgetId()Gets the idgetMax()Gets the maxgetMin()Gets the minGets the positionGets the titleGets the suggestedMaxGets the suggestedMinbooleanisOffset()Gets the offsetbooleanReverse the scale.booleanGets the stackedvoidsetGrid(AxesGridLines grid) Sets the gridvoidSets the idvoidSets the maxvoidSets the minvoidsetOffset(boolean offset) Sets the offsetvoidsetPosition(String position) Sets the positionvoidsetReverse(boolean reverse) Reverse the scale.voidsetScaleTitle(CartesianScaleTitle title) Sets the titlevoidsetStacked(boolean stacked) Sets the stackedvoidsetSuggestedMax(Number suggestedMax) Sets the suggestedMaxvoidsetSuggestedMin(Number suggestedMin) Sets the suggestedMin
-
Constructor Details
-
CartesianAxes
public CartesianAxes()
-
-
Method Details
-
getPosition
Gets the position- Returns:
- position
-
setPosition
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
Gets the id- Returns:
- id
-
setId
Sets the id- Parameters:
id- The ID is used to link datasets and scale axes together.
-
getGrid
Gets the grid- Returns:
- grid
-
setGrid
Sets the grid- Parameters:
grid- theAxesGridLinesobject
-
getScaleTitle
Gets the title- Returns:
- title
-
setScaleTitle
Sets the title- Parameters:
title- theCartesianScaleTitleobject
-
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.
-
isReverse
public boolean isReverse()Reverse the scale.- Returns:
- reverse
-
setReverse
public void setReverse(boolean reverse) Reverse the scale.- Parameters:
reverse- Reverse the scale.
-
getSuggestedMax
Gets the suggestedMax- Returns:
- suggestedMax
-
setSuggestedMax
Sets the suggestedMax- Parameters:
suggestedMax- Adjustment used when calculating the maximum data value.
-
getSuggestedMin
Gets the suggestedMin- Returns:
- suggestedMin
-
setSuggestedMin
Sets the suggestedMin- Parameters:
suggestedMin- Adjustment used when calculating the minimum data value.
-
getMin
Gets the min- Returns:
- min
-
setMin
Sets the min- Parameters:
min- User defined minimum number for the scale, overrides minimum value from data.
-
getMax
Gets the max- Returns:
- max
-
setMax
Sets the max- Parameters:
max- User defined maximum number for the scale, overrides maximum value from data.
-
encode
Write the common options of cartesian axes- Returns:
- options as JSON object
- Throws:
IOException- If an I/O error occurs
-