|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.data.AbstractDataset
org.jfree.data.HistogramDataset
A dataset that can be used for creating histograms.
See the HistogramDemo.java
file in the JFreeChart distribution for an example.
Field Summary | |
static org.jfree.data.HistogramDataset.HistogramType |
FREQUENCY
A constant to indicate a frequency histogram, also the default. |
static org.jfree.data.HistogramDataset.HistogramType |
RELATIVE_FREQUENCY
A constant to indicate a relative frequency histogram. |
static org.jfree.data.HistogramDataset.HistogramType |
SCALE_AREA_TO_1
A constant to indicate a histogram where the total area is scaled to 1. |
Constructor Summary | |
HistogramDataset()
|
Method Summary | |
void |
addSeries(java.lang.String name,
double[] values,
int numberOfBins)
Adds a series. |
java.lang.Number |
getEndXValue(int series,
int item)
Returns the end value for a bin. |
java.lang.Number |
getEndYValue(int series,
int item)
Returns the Y value for a bin. |
int |
getItemCount(int series)
Returns the number of data items for a series. |
int |
getSeriesCount()
Returns the number of series in the dataset. |
java.lang.String |
getSeriesName(int series)
Returns the name for a series. |
java.lang.Number |
getStartXValue(int series,
int item)
Returns the start value for a bin. |
java.lang.Number |
getStartYValue(int series,
int item)
Returns the Y value for a bin. |
org.jfree.data.HistogramDataset.HistogramType |
getType()
Returns the histogram type. |
java.lang.Number |
getXValue(int series,
int item)
Returns the X value for a bin. |
java.lang.Number |
getYValue(int series,
int item)
Returns the Y value for a bin. |
void |
setType(org.jfree.data.HistogramDataset.HistogramType type)
Sets the histogram type. |
Methods inherited from class org.jfree.data.AbstractDataset |
addChangeListener, clone, fireDatasetChanged, getGroup, notifyListeners, removeChangeListener, setGroup, validateObject |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jfree.data.Dataset |
addChangeListener, getGroup, removeChangeListener, setGroup |
Field Detail |
public static final org.jfree.data.HistogramDataset.HistogramType FREQUENCY
public static org.jfree.data.HistogramDataset.HistogramType RELATIVE_FREQUENCY
public static org.jfree.data.HistogramDataset.HistogramType SCALE_AREA_TO_1
Constructor Detail |
public HistogramDataset()
Method Detail |
public void setType(org.jfree.data.HistogramDataset.HistogramType type)
type
- the type (null
not permitted).public org.jfree.data.HistogramDataset.HistogramType getType()
public void addSeries(java.lang.String name, double[] values, int numberOfBins)
name
- the series name.values
- the values (null
not permitted).numberOfBins
- the number of bins (must be at least 1).public int getSeriesCount()
getSeriesCount
in interface SeriesDataset
public java.lang.String getSeriesName(int series)
getSeriesName
in interface SeriesDataset
series
- the series index (zero based).
public int getItemCount(int series)
getItemCount
in interface XYDataset
series
- the series index (zero based).
public java.lang.Number getXValue(int series, int item)
This value won't be used for plotting histograms, since the renderer will ignore it. But other renderers can use it (for example, you could use the dataset to create a line chart).
getXValue
in interface XYDataset
series
- the series index (zero based).item
- the item index (zero based).
public java.lang.Number getYValue(int series, int item)
getYValue
in interface XYDataset
series
- the series index (zero based).item
- the item index (zero based).
public java.lang.Number getStartXValue(int series, int item)
getStartXValue
in interface IntervalXYDataset
series
- the series index (zero based).item
- the item index (zero based).
public java.lang.Number getEndXValue(int series, int item)
getEndXValue
in interface IntervalXYDataset
series
- the series index (zero based).item
- the item index (zero based).
public java.lang.Number getStartYValue(int series, int item)
getStartYValue
in interface IntervalXYDataset
series
- the series index (zero based).item
- the item index (zero based).
public java.lang.Number getEndYValue(int series, int item)
getEndYValue
in interface IntervalXYDataset
series
- the series index (zero based).item
- the item index (zero based).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |