Class CartesianCategoryAxes
- java.lang.Object
-
- org.primefaces.model.charts.axes.cartesian.CartesianAxes
-
- org.primefaces.model.charts.axes.cartesian.category.CartesianCategoryAxes
-
- All Implemented Interfaces:
Serializable
public class CartesianCategoryAxes extends CartesianAxes
If global configuration is used, labels are drawn from one of the label arrays included in the chart data. If only data.labels is defined, this will be used. If data.xLabels is defined and the axis is horizontal, this will be used. Similarly, if data.yLabels is defined and the axis is vertical, this property will be used. Using both xLabels and yLabels together can create a chart that uses strings for both the X and Y axes. CartesianCategoryAxes extendsCartesianAxes.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CartesianCategoryAxes()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringencode()Write the options of cartesian category axesList<String>getLabels()Gets the labelsCartesianCategoryTicksgetTicks()Gets the ticksStringgetType()Gets the typevoidsetLabels(List<String> labels)Sets the labelsvoidsetTicks(CartesianCategoryTicks ticks)Sets the ticksvoidsetType(String type)Sets the type-
Methods inherited from class org.primefaces.model.charts.axes.cartesian.CartesianAxes
getGridLines, getId, getPosition, getScaleLabel, isOffset, isStacked, setGridLines, setId, setOffset, setPosition, setScaleLabel, setStacked
-
-
-
-
Method Detail
-
getTicks
public CartesianCategoryTicks getTicks()
Gets the ticks- Returns:
- ticks
-
setTicks
public void setTicks(CartesianCategoryTicks ticks)
Sets the ticks- Parameters:
ticks- theCartesianCategoryTicksobject
-
getType
public String getType()
Gets the type- Returns:
- type of cartesian axes
-
setType
public void setType(String type)
Sets the type- Parameters:
type- the type of cartesian axes
-
setLabels
public void setLabels(List<String> labels)
Sets the labels- Parameters:
labels- List<String> list of labels to display.
-
encode
public String encode() throws IOException
Write the options of cartesian category axes- Overrides:
encodein classCartesianAxes- Returns:
- options as JSON object
- Throws:
IOException- If an I/O error occurs
-
-