Package org.silverpeas.core.chart
Class AbstractAxisChart<X,Y,I extends AbstractAxisChartItem<X,Y,I>>
- java.lang.Object
-
- org.silverpeas.core.chart.AbstractChart<I>
-
- org.silverpeas.core.chart.AbstractAxisChart<X,Y,I>
-
- All Implemented Interfaces:
Chart<I>
- Direct Known Subclasses:
PeriodChart
public abstract class AbstractAxisChart<X,Y,I extends AbstractAxisChartItem<X,Y,I>> extends AbstractChart<I>
- Author:
- Yohann Chastagnier
-
-
Constructor Summary
Constructors Constructor Description AbstractAxisChart()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T extends AbstractChart<I>>
Tadd(I item)
Adds an item into the list of chart items.protected void
computeExtraDataAsJson(JSONCodec.JSONObject jsonChart)
Overriding this method if necessary.I
forX(X xValue)
Creates or gets the item associated to the given x value.ChartAxis
getAxisX()
Gets theChartAxis
that represents the x axis.ChartAxis
getAxisY()
Gets theChartAxis
that represents the y axis.protected I
getItemFrom(X xValue)
Gets the item associated to the given x value.-
Methods inherited from class org.silverpeas.core.chart.AbstractChart
addExtra, asJson, getExtra, getItems, getTitle, withTitle
-
-
-
-
Method Detail
-
getAxisX
public ChartAxis getAxisX()
Gets theChartAxis
that represents the x axis.- Returns:
- the
ChartAxis
of x axis.
-
getAxisY
public ChartAxis getAxisY()
Gets theChartAxis
that represents the y axis.- Returns:
- the
ChartAxis
of y axis.
-
computeExtraDataAsJson
protected void computeExtraDataAsJson(JSONCodec.JSONObject jsonChart)
Description copied from class:AbstractChart
Overriding this method if necessary.- Overrides:
computeExtraDataAsJson
in classAbstractChart<I extends AbstractAxisChartItem<X,Y,I>>
- Parameters:
jsonChart
- the json object that represents the chart.
-
getItemFrom
protected I getItemFrom(X xValue)
Gets the item associated to the given x value.- Parameters:
xValue
- the x value.- Returns:
- the associated item, null if none.
-
add
protected <T extends AbstractChart<I>> T add(I item)
Description copied from class:AbstractChart
Adds an item into the list of chart items.- Overrides:
add
in classAbstractChart<I extends AbstractAxisChartItem<X,Y,I>>
- Parameters:
item
- the chart item to add.- Returns:
- the instance of the chart itself.
-
-