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 String
encode()
Write the common options of cartesian axesAxesGridLines
getGrid()
Gets the gridString
getId()
Gets the idNumber
getMax()
Gets the maxNumber
getMin()
Gets the minString
getPosition()
Gets the positionCartesianScaleTitle
getScaleTitle()
Gets the titleNumber
getSuggestedMax()
Gets the suggestedMaxNumber
getSuggestedMin()
Gets the suggestedMinboolean
isOffset()
Gets the offsetboolean
isReverse()
Reverse the scale.boolean
isStacked()
Gets the stackedvoid
setGrid(AxesGridLines grid)
Sets the gridvoid
setId(String id)
Sets the idvoid
setMax(Number max)
Sets the maxvoid
setMin(Number min)
Sets the minvoid
setOffset(boolean offset)
Sets the offsetvoid
setPosition(String position)
Sets the positionvoid
setReverse(boolean reverse)
Reverse the scale.void
setScaleTitle(CartesianScaleTitle title)
Sets the titlevoid
setStacked(boolean stacked)
Sets the stackedvoid
setSuggestedMax(Number suggestedMax)
Sets the suggestedMaxvoid
setSuggestedMin(Number suggestedMin)
Sets the suggestedMin
-
-
-
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.
-
getGrid
public AxesGridLines getGrid()
Gets the grid- Returns:
- grid
-
setGrid
public void setGrid(AxesGridLines grid)
Sets the grid- Parameters:
grid
- theAxesGridLines
object
-
getScaleTitle
public CartesianScaleTitle getScaleTitle()
Gets the title- Returns:
- title
-
setScaleTitle
public void setScaleTitle(CartesianScaleTitle title)
Sets the title- Parameters:
title
- theCartesianScaleTitle
object
-
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
public Number getSuggestedMax()
Gets the suggestedMax- Returns:
- suggestedMax
-
setSuggestedMax
public void setSuggestedMax(Number suggestedMax)
Sets the suggestedMax- Parameters:
suggestedMax
- Adjustment used when calculating the maximum data value.
-
getSuggestedMin
public Number getSuggestedMin()
Gets the suggestedMin- Returns:
- suggestedMin
-
setSuggestedMin
public void setSuggestedMin(Number suggestedMin)
Sets the suggestedMin- Parameters:
suggestedMin
- Adjustment used when calculating the minimum data value.
-
getMin
public Number getMin()
Gets the min- Returns:
- min
-
setMin
public void setMin(Number min)
Sets the min- Parameters:
min
- User defined minimum number for the scale, overrides minimum value from data.
-
getMax
public Number getMax()
Gets the max- Returns:
- max
-
setMax
public void setMax(Number max)
Sets the max- Parameters:
max
- User defined maximum number for the scale, overrides maximum value from data.
-
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
-
-