Package org.zkoss.chart.model
Class DefaultBoxPlotModel
- java.lang.Object
-
- org.zkoss.chart.model.AbstractChartsModel
-
- org.zkoss.chart.model.DefaultBoxPlotModel
-
- All Implemented Interfaces:
Serializable
,BoxPlotModel
,ChartsModel
public class DefaultBoxPlotModel extends AbstractChartsModel implements BoxPlotModel
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
DefaultBoxPlotModel.BoxplotTuple
-
Field Summary
Fields Modifier and Type Field Description protected List<Comparable<?>>
_seriesList
protected Map<Comparable<?>,List<DefaultBoxPlotModel.BoxplotTuple>>
_seriesMap
-
Fields inherited from class org.zkoss.chart.model.AbstractChartsModel
_listeners
-
-
Constructor Summary
Constructors Constructor Description DefaultBoxPlotModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addValue(Comparable<?> series, Number low, Number q1, Number median, Number q3, Number high)
Append a (low, q1, median, q3, high) value into the the given series.void
addValue(Comparable<?> series, Number low, Number q1, Number median, Number q3, Number high, int index)
Add a (low, q1, median, q3, high) value into the the given series at the given index.void
addValue(Comparable<?> series, Number x, Number low, Number q1, Number median, Number q3, Number high)
Append a (x, low, q1, median, q3, high) value into the the given series.void
addValue(Comparable<?> series, Number x, Number low, Number q1, Number median, Number q3, Number high, int index)
Add a (x, low, q1, median, q3, high) value into the the given series at the given index.void
addValue(Comparable<?> series, String name, Number low, Number q1, Number median, Number q3, Number high)
Append a (name, low, q1, median, q3, high) value into the the given series.void
addValue(Comparable<?> series, String name, Number low, Number q1, Number median, Number q3, Number high, int index)
Add a (name, low, q1, median, q3, high) value into the the given series at the given index.void
clear()
clear this model.Object
clone()
int
getDataCount(Comparable<?> series)
Get data count of a specified series.Number
getHigh(Comparable<?> series, int index)
Get the high value from the specified series at the given index.Number
getLow(Comparable<?> series, int index)
Get the low value from the specified series at the given index.Number
getMedian(Comparable<?> series, int index)
Get the median value from the specified series at the given index.String
getName(Comparable<?> series, int index)
Get the name value from the specified series at the given index.Number
getQ1(Comparable<?> series, int index)
Get the q1 value from the specified series at the given index.Number
getQ3(Comparable<?> series, int index)
Get the q3 value from the specified series at the given index.Collection<Comparable<?>>
getSeries()
Get all series as a collection.Comparable<?>
getSeries(int index)
Get a series of the specified index;Number
getX(Comparable<?> series, int index)
Get the x value from the specified series at the given index.void
removeSeries(Comparable<?> series)
Remove data of a specified series.void
removeValue(Comparable<?> series, int index)
Remove a (x, low, q1, median, q3, high) value from the specified series at the given index.void
setValue(Comparable<?> series, Number low, Number q1, Number median, Number q3, Number high, int index)
Replace the (low, q1, median, q3, high) value at the given index of the specified series.void
setValue(Comparable<?> series, Number x, Number low, Number q1, Number median, Number q3, Number high, int index)
Replace the (x, low, q1, median, q3, high) value at the given index of the specified series.void
setValue(Comparable<?> series, String name, Number low, Number q1, Number median, Number q3, Number high, int index)
Replace the (name, low, q1, median, q3, high) value at the given index of the specified series.-
Methods inherited from class org.zkoss.chart.model.AbstractChartsModel
addChartsDataListener, fireEvent, removeChartsDataListener
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.zkoss.chart.model.ChartsModel
addChartsDataListener, removeChartsDataListener
-
-
-
-
Field Detail
-
_seriesMap
protected Map<Comparable<?>,List<DefaultBoxPlotModel.BoxplotTuple>> _seriesMap
-
_seriesList
protected List<Comparable<?>> _seriesList
-
-
Method Detail
-
getSeries
public Comparable<?> getSeries(int index)
Description copied from interface:BoxPlotModel
Get a series of the specified index;- Specified by:
getSeries
in interfaceBoxPlotModel
-
getSeries
public Collection<Comparable<?>> getSeries()
Description copied from interface:BoxPlotModel
Get all series as a collection.- Specified by:
getSeries
in interfaceBoxPlotModel
-
getDataCount
public int getDataCount(Comparable<?> series)
Description copied from interface:BoxPlotModel
Get data count of a specified series.- Specified by:
getDataCount
in interfaceBoxPlotModel
- Parameters:
series
- the specified series.
-
getName
public String getName(Comparable<?> series, int index)
Description copied from interface:BoxPlotModel
Get the name value from the specified series at the given index.- Specified by:
getName
in interfaceBoxPlotModel
- Returns:
- name the name value
-
getX
public Number getX(Comparable<?> series, int index)
Description copied from interface:BoxPlotModel
Get the x value from the specified series at the given index.- Specified by:
getX
in interfaceBoxPlotModel
- Returns:
- x the x value
-
getLow
public Number getLow(Comparable<?> series, int index)
Description copied from interface:BoxPlotModel
Get the low value from the specified series at the given index.- Specified by:
getLow
in interfaceBoxPlotModel
- Returns:
- low the low value
-
getQ1
public Number getQ1(Comparable<?> series, int index)
Description copied from interface:BoxPlotModel
Get the q1 value from the specified series at the given index.- Specified by:
getQ1
in interfaceBoxPlotModel
- Returns:
- q1 the q1 value
-
getMedian
public Number getMedian(Comparable<?> series, int index)
Description copied from interface:BoxPlotModel
Get the median value from the specified series at the given index.- Specified by:
getMedian
in interfaceBoxPlotModel
- Returns:
- median the median value
-
getQ3
public Number getQ3(Comparable<?> series, int index)
Description copied from interface:BoxPlotModel
Get the q3 value from the specified series at the given index.- Specified by:
getQ3
in interfaceBoxPlotModel
- Returns:
- q3 the q3 value
-
getHigh
public Number getHigh(Comparable<?> series, int index)
Description copied from interface:BoxPlotModel
Get the high value from the specified series at the given index.- Specified by:
getHigh
in interfaceBoxPlotModel
- Returns:
- high the high value
-
setValue
public void setValue(Comparable<?> series, Number low, Number q1, Number median, Number q3, Number high, int index)
Description copied from interface:BoxPlotModel
Replace the (low, q1, median, q3, high) value at the given index of the specified series.- Specified by:
setValue
in interfaceBoxPlotModel
- Parameters:
series
- the serieslow
- the low valueq1
- the q1 valuemedian
- the median valueq3
- the q1 valuehigh
- the high valueindex
- the data index
-
setValue
public void setValue(Comparable<?> series, Number x, Number low, Number q1, Number median, Number q3, Number high, int index)
Description copied from interface:BoxPlotModel
Replace the (x, low, q1, median, q3, high) value at the given index of the specified series.- Specified by:
setValue
in interfaceBoxPlotModel
- Parameters:
series
- the seriesx
- the x valuelow
- the low valueq1
- the q1 valuemedian
- the median valueq3
- the q1 valuehigh
- the high valueindex
- the data index
-
setValue
public void setValue(Comparable<?> series, String name, Number low, Number q1, Number median, Number q3, Number high, int index)
Description copied from interface:BoxPlotModel
Replace the (name, low, q1, median, q3, high) value at the given index of the specified series.- Specified by:
setValue
in interfaceBoxPlotModel
- Parameters:
series
- the serieslow
- the low valueq1
- the q1 valuemedian
- the median valueq3
- the q1 valuehigh
- the high valueindex
- the data index
-
addValue
public void addValue(Comparable<?> series, Number low, Number q1, Number median, Number q3, Number high)
Description copied from interface:BoxPlotModel
Append a (low, q1, median, q3, high) value into the the given series.- Specified by:
addValue
in interfaceBoxPlotModel
- Parameters:
series
- the series to append this value intolow
- the low valueq1
- the q1 valuemedian
- the median valueq3
- the q1 valuehigh
- the high value
-
addValue
public void addValue(Comparable<?> series, Number x, Number low, Number q1, Number median, Number q3, Number high)
Description copied from interface:BoxPlotModel
Append a (x, low, q1, median, q3, high) value into the the given series.- Specified by:
addValue
in interfaceBoxPlotModel
- Parameters:
series
- the series to append this value intox
- the x valuelow
- the low valueq1
- the q1 valuemedian
- the median valueq3
- the q1 valuehigh
- the high value
-
addValue
public void addValue(Comparable<?> series, String name, Number low, Number q1, Number median, Number q3, Number high)
Description copied from interface:BoxPlotModel
Append a (name, low, q1, median, q3, high) value into the the given series.- Specified by:
addValue
in interfaceBoxPlotModel
- Parameters:
series
- the series to append this value intoname
- the name valuelow
- the low valueq1
- the q1 valuemedian
- the median valueq3
- the q1 valuehigh
- the high value
-
addValue
public void addValue(Comparable<?> series, Number low, Number q1, Number median, Number q3, Number high, int index)
Description copied from interface:BoxPlotModel
Add a (low, q1, median, q3, high) value into the the given series at the given index.- Specified by:
addValue
in interfaceBoxPlotModel
- Parameters:
series
- the series to append this value intolow
- the low valueq1
- the q1 valuemedian
- the median valueq3
- the q1 valuehigh
- the high valueindex
- the index value
-
addValue
public void addValue(Comparable<?> series, Number x, Number low, Number q1, Number median, Number q3, Number high, int index)
Description copied from interface:BoxPlotModel
Add a (x, low, q1, median, q3, high) value into the the given series at the given index.- Specified by:
addValue
in interfaceBoxPlotModel
- Parameters:
series
- the series to append this value intox
- the x valuelow
- the low valueq1
- the q1 valuemedian
- the median valueq3
- the q1 valuehigh
- the high valueindex
- the index value
-
addValue
public void addValue(Comparable<?> series, String name, Number low, Number q1, Number median, Number q3, Number high, int index)
Description copied from interface:BoxPlotModel
Add a (name, low, q1, median, q3, high) value into the the given series at the given index.- Specified by:
addValue
in interfaceBoxPlotModel
- Parameters:
series
- the series to append this value intoname
- the name valuelow
- the low valueq1
- the q1 valuemedian
- the median valueq3
- the q1 valuehigh
- the high valueindex
- the index value
-
removeSeries
public void removeSeries(Comparable<?> series)
Description copied from interface:BoxPlotModel
Remove data of a specified series.- Specified by:
removeSeries
in interfaceBoxPlotModel
- Parameters:
series
- the series
-
removeValue
public void removeValue(Comparable<?> series, int index)
Description copied from interface:BoxPlotModel
Remove a (x, low, q1, median, q3, high) value from the specified series at the given index.- Specified by:
removeValue
in interfaceBoxPlotModel
- Parameters:
series
- the series.index
- the data index.
-
clear
public void clear()
Description copied from interface:BoxPlotModel
clear this model.- Specified by:
clear
in interfaceBoxPlotModel
-
clone
public Object clone()
- Overrides:
clone
in classAbstractChartsModel
-
-