P
- Type of Plotpublic class TimeChart<P extends PeriodSequencePlot> extends PeriodChart<P>
PeriodSequencePlot
so we can add data with the addData
methods.
The number of points to plot is ultimately chosen by the implementing package but the the TimePeriod
is specified as a SplitTimePeriod
and a guidance parameter indicates roughly the number of points that should be within each
split of the period.
The period splits should also give an indication of the desired frequency of the time axis labels and of columns in the table representation
The model is that Object classes can implement a method to add additional plots to a TimeChart Note that we don't assume the major time ticks are necessarily the same length this allows us to plot on month boundaries etc.
conn
Modifier | Constructor and Description |
---|---|
protected |
TimeChart(AppContext c) |
Modifier and Type | Method and Description |
---|---|
P |
addAreaGraph(int nSet)
add a solid area graph to the timechart and return the dataset so values
can be added
|
P |
addAreaGraph(int nSet,
java.awt.Color[] custom) |
P |
addAreaGraph(P p,
java.awt.Color[] custom) |
P |
addAreaGraph(java.lang.String[] new_legends)
add a solid area graph with lables to the timechart and return the
dataset so values can be added
|
P |
addLineGraph(int nSet) |
P |
addLineGraph(int nSet,
java.awt.Color[] custom) |
P |
addLineGraph(P p,
java.awt.Color[] custom) |
P |
addLineGraph(java.lang.String[] new_legends)
add a line graph returning the dataset so data can be added
|
P |
addLineGraph(java.lang.String[] new_legends,
java.awt.Color[] colours)
add a line graph returning the dataset so data can be added
|
void |
addWarningLevel(double value) |
TimeChartData<P> |
getChartData() |
static TimeChart |
getInstance(AppContext c,
java.util.Calendar s,
java.util.Calendar e,
int major,
int minor) |
static TimeChart |
getInstance(AppContext conn,
java.util.Calendar start,
java.util.Calendar end,
int field,
int count,
int minor)
generate a timechart with splits at multiples of a Calendar field number
of major splits is calculated so as to include the end time.
|
static TimeChart |
getInstance(AppContext conn,
java.util.Calendar c,
int field,
int count,
int major,
int minor)
Create TimeChart with splits at multiples of a Calendar field
|
static TimeChart |
getInstance(AppContext c,
java.util.Date s,
java.util.Date e,
int major,
int minor) |
static TimeChart |
getInstance(AppContext c,
SplitTimePeriod p,
int minor) |
Table |
getTable()
Generate a table representing the Chart
|
addData, addDataArray, addDataIterator, addMapData, getEndDate, getPeriod, getStartDate
getLegendName, makeDataset, setChartData, setLegendName, sortSets, sortSets, sortSets
getContext, getLogger, resetLogger
protected TimeChart(AppContext c)
public TimeChartData<P> getChartData()
getChartData
in class PeriodChart<P extends PeriodSequencePlot>
public P addAreaGraph(int nSet) throws java.lang.Exception
nSet
- java.lang.Exception
public P addAreaGraph(P p, java.awt.Color[] custom) throws java.lang.Exception
java.lang.Exception
public P addAreaGraph(int nSet, java.awt.Color[] custom) throws java.lang.Exception
java.lang.Exception
public P addAreaGraph(java.lang.String[] new_legends) throws java.lang.Exception
new_legends
- java.lang.Exception
public P addLineGraph(int nSet) throws java.lang.Exception
java.lang.Exception
public P addLineGraph(P p, java.awt.Color[] custom) throws java.lang.Exception
java.lang.Exception
public P addLineGraph(int nSet, java.awt.Color[] custom) throws java.lang.Exception
java.lang.Exception
public P addLineGraph(java.lang.String[] new_legends) throws java.lang.Exception
new_legends
- java.lang.Exception
public P addLineGraph(java.lang.String[] new_legends, java.awt.Color[] colours) throws java.lang.Exception
new_legends
- colours
- java.lang.Exception
public Table getTable()
PeriodChart
getTable
in class PeriodChart<P extends PeriodSequencePlot>
public void addWarningLevel(double value)
public static TimeChart getInstance(AppContext c, java.util.Calendar s, java.util.Calendar e, int major, int minor) throws InvalidArgument
InvalidArgument
public static TimeChart getInstance(AppContext conn, java.util.Calendar start, java.util.Calendar end, int field, int count, int minor) throws InvalidArgument
conn
- start
- start timeend
- minimum end timefield
- field to usecount
- multiples of field in major stepminor
- number of minor steps.InvalidArgument
public static TimeChart getInstance(AppContext conn, java.util.Calendar c, int field, int count, int major, int minor) throws InvalidArgument
conn
- c
- start timefield
- which Calendar field to usecount
- multiples of field per major divisionmajor
- number of major divisionsminor
- number of minor divisions.InvalidArgument
public static TimeChart getInstance(AppContext c, java.util.Date s, java.util.Date e, int major, int minor) throws InvalidArgument
InvalidArgument
public static TimeChart getInstance(AppContext c, SplitTimePeriod p, int minor) throws InvalidArgument
c
- AppContextp
- SplitPeriodminor
- InvalidArgument