Public Member Functions | |
| void | addSeries (String sName, double[] p_fValues, int iNumberOfBins, float fBinSize) |
| Adds a series. | |
| void | AddTotalSeries () |
| Adds a series that is, for each bin, a total of the values of all other series' values in that bin. | |
| int | getSeriesCount () |
| Returns the number of series in the dataset. | |
| String | getSeriesName (int series) |
| Returns the name for a series. | |
| int | getItemCount (int series) |
| Returns the number of data items for a series. | |
| Number | getXValue (int series, int item) |
| Returns the X value for a bin. | |
| Number | getYValue (int series, int item) |
| Returns the Y value for a bin. | |
| void | setYValue (int series, int item, float iValue) |
| Sets the Y value for a bin. | |
| Number | getStartXValue (int series, int item) |
| Returns the start value for a bin. | |
| Number | getEndXValue (int series, int item) |
| Returns the end value for a bin. | |
| Number | getStartYValue (int series, int item) |
| Returns the Y value for a bin. | |
| Number | getEndYValue (int series, int item) |
| Returns the Y value for a bin. | |
| void | RemoveSeries (int series) |
| I added this. | |
| Object | clone () |
| I added this. | |
Private Member Functions | |
| HistogramBin[] | getBins (int series) |
| Returns the bins for a series. | |
| int | getTotal (int series) |
| Returns the total for a series. | |
| double | getBinWidth (int series) |
| Returns the bin width for a series. | |
Private Attributes | |
| List | list = new ArrayList() |
| Histogram list. | |
It did not suit my needs - particularly the ability to modify series. So I've made my own.
Copyright: Copyright (c) Charles D. Canham 2003
Company: Institute of Ecosystem Studies
| void datavisualizer::ModelHistogramDataset::addSeries | ( | String | sName, | |
| double[] | p_fValues, | |||
| int | iNumberOfBins, | |||
| float | fBinSize | |||
| ) | [inline] |
Adds a series.
| sName | the series name. | |
| p_fValues | the values (null not permitted). | |
| iNumberOfBins | the number of bins (must be at least 1). | |
| fBinSize | the size of the bins. |
| void datavisualizer::ModelHistogramDataset::AddTotalSeries | ( | ) | [inline] |
Adds a series that is, for each bin, a total of the values of all other series' values in that bin.
Edit history:
------------------
December 6, 2004: Created (LEM)
| Object datavisualizer::ModelHistogramDataset::clone | ( | ) | [inline] |
I added this.
This creates a deep-enough clone of the dataset. The array list is cloned but not the underlying values - it is enough to be able to remove references in the clone. I don't need it deeper, so I didn't write it deeper.
| HistogramBin [] datavisualizer::ModelHistogramDataset::getBins | ( | int | series | ) | [inline, private] |
Returns the bins for a series.
| series | the series index. |
| double datavisualizer::ModelHistogramDataset::getBinWidth | ( | int | series | ) | [inline, private] |
Returns the bin width for a series.
| series | the series index (zero based). |
| Number datavisualizer::ModelHistogramDataset::getEndXValue | ( | int | series, | |
| int | item | |||
| ) | [inline] |
Returns the end value for a bin.
| series | the series index (zero based). | |
| item | the item index (zero based). |
| Number datavisualizer::ModelHistogramDataset::getEndYValue | ( | int | series, | |
| int | item | |||
| ) | [inline] |
Returns the Y value for a bin.
| series | the series index (zero based). | |
| item | the item index (zero based). |
| int datavisualizer::ModelHistogramDataset::getItemCount | ( | int | series | ) | [inline] |
Returns the number of data items for a series.
| series | the series index (zero based). |
| int datavisualizer::ModelHistogramDataset::getSeriesCount | ( | ) | [inline] |
Returns the number of series in the dataset.
| String datavisualizer::ModelHistogramDataset::getSeriesName | ( | int | series | ) | [inline] |
Returns the name for a series.
| series | the series index (zero based). |
| Number datavisualizer::ModelHistogramDataset::getStartXValue | ( | int | series, | |
| int | item | |||
| ) | [inline] |
Returns the start value for a bin.
| series | the series index (zero based). | |
| item | the item index (zero based). |
| Number datavisualizer::ModelHistogramDataset::getStartYValue | ( | int | series, | |
| int | item | |||
| ) | [inline] |
Returns the Y value for a bin.
| series | the series index (zero based). | |
| item | the item index (zero based). |
| int datavisualizer::ModelHistogramDataset::getTotal | ( | int | series | ) | [inline, private] |
Returns the total for a series.
| series | the series index. |
| Number datavisualizer::ModelHistogramDataset::getXValue | ( | int | series, | |
| int | item | |||
| ) | [inline] |
Returns the X value for a bin.
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).
| series | the series index (zero based). | |
| item | the item index (zero based). |
| Number datavisualizer::ModelHistogramDataset::getYValue | ( | int | series, | |
| int | item | |||
| ) | [inline] |
Returns the Y value for a bin.
| series | the series index (zero based). | |
| item | the item index (zero based) - i.e. bin number. |
| void datavisualizer::ModelHistogramDataset::RemoveSeries | ( | int | series | ) | [inline] |
I added this.
I wanted to be able to remove a series.
| series | The series index (zero based). |
| void datavisualizer::ModelHistogramDataset::setYValue | ( | int | series, | |
| int | item, | |||
| float | iValue | |||
| ) | [inline] |
Sets the Y value for a bin.
Added by Lora to allow for adjusting values to be per hectare.
| series | the series index (zero based). | |
| item | the item index (zero based). | |
| iValue | the new value to set. |
1.4.7