YATiSh
Yet Another TIme SHeet
|
Abstract Base class for the plots of panel #3. More...
#include <yatishPlot.h>
Public Member Functions | |
yatishPlot (yatishDBsqlite *) | |
The constructor of yatishPlot: More... | |
virtual | ~yatishPlot () |
void | SetFirstDay (const wxDateTime &dt) |
void | SetLastDay (const wxDateTime &dt) |
virtual void | PlotData (ClusterType, AggregateType)=0 |
Plotting interface for yatishFrame: More... | |
virtual wxString | TotalFormatted () |
Protected Member Functions | |
void | GetWeekRange (unsigned int &, unsigned int &) |
Computes the week numbers corresponding to members firstDay and lastDay . More... | |
void | ComputePie (ClusterType) |
Fills member pieData with data for a pie chart with 4 sectors. More... | |
wxString | TotalFormattedFromPie () |
Creates a wxString with the total hours in the current pie chart. More... | |
bool | SelectData (ClusterType, AggregateType) |
Updates vector_Y[3] if need be (for the plotting libraries). More... | |
virtual void | SetRangeX () |
virtual void | ClearCurves () |
Protected Attributes | |
Map4pie | pieData |
total durations (between firstDay and lastDay ), in minutes More... | |
wxDateTime | firstDay |
wxDateTime | lastDay |
AggregateType | formerAggregate |
Static Protected Attributes | |
static ProcessedData | data |
weekly times series: various aggregates and clustered sums More... | |
static string | legends [3] |
names of the 3 weekly clustered sums, for the current clustering scheme More... | |
static vector< double > | vector_X |
epoch time More... | |
static vector< double > | vector_X2 |
week number, counted from the first year in the time series More... | |
static vector< double > | vector_Y [3] |
user selected data More... | |
Private Member Functions | |
void | Aggregates () |
Builds all the weekly time series (non-clustered aggregates). More... | |
void | NoMoreThan4 () |
Modifies member pieData so that there is no more than four record. More... | |
void | ClusteredSeries (ClusterType) |
Updates the clustered time series. More... | |
Static Private Attributes | |
static bool | data_loaded = false |
static RawData | big_data |
all timeslot records from the database More... | |
Abstract Base class for the plots of panel #3.
The times series are compiled on a weekly basis.
They are either "aggregated" (only one curve is shown at any time):
or "clustered" (the 3 most significant curves are shown):
and in the latter case the relevant aggregate is "hours (total)" [per week].
Definition at line 34 of file yatishPlot.h.
yatishPlot::yatishPlot | ( | yatishDBsqlite * | pdb | ) |
The constructor of yatishPlot:
Definition at line 36 of file yatishPlot.cpp.
|
inlinevirtual |
Definition at line 37 of file yatishPlot.h.
|
private |
Builds all the weekly time series (non-clustered aggregates).
big_data
was ordered by increasing Record.start thanks to yatishDBsqlite::FillPlotData(). No time window here. Definition at line 90 of file yatishPlot.cpp.
|
inlineprotectedvirtual |
Reimplemented in yatishFreeSerie, and yatishMathPlot.
Definition at line 68 of file yatishPlot.h.
|
private |
Updates the clustered time series.
No time filtering here, but the curves are selected according to Pies() which does take the date range into account.
Definition at line 238 of file yatishPlot.cpp.
|
protected |
Fills member pieData
with data for a pie chart with 4 sectors.
Only the records between firstday
and lastDay
are considered.
[in] | clusters | any value except none |
legend
. Definition at line 152 of file yatishPlot.cpp.
|
protected |
Computes the week numbers corresponding to members firstDay
and lastDay
.
[in,out] | firstWeek | week number corresponding to the current value of firstDay |
[in,out] | lastWeek | week number corresponding to the current value of lastDay |
vector_X2
. Definition at line 64 of file yatishPlot.cpp.
|
private |
Modifies member pieData
so that there is no more than four record.
Creates or rename an others
key, which contains the smallest item(s).
Definition at line 194 of file yatishPlot.cpp.
|
pure virtual |
Plotting interface for yatishFrame:
[in] | clusters | the clusters to compute and show; default: none |
[in] | aggregate | if clusters are not used, the aggregate to show; default: hoursTotal |
runtime instability when clusters == tools
or when switching back from pie chart (debug mode), although no problem was debugger detected in ComputePie() nor ClusteredSeries()
default plot (timeSeries/hoursTotal/none) sometimes empty when changing library in settings (need to play with aggregate choice to recover it)
Implemented in yatishChartPie, yatishChartSerie, yatishFreePie, yatishFreeSerie, and yatishMathPlot.
|
protected |
Updates vector_Y[3]
if need be (for the plotting libraries).
true
if nothing else to be done (false
if replot is needed) Definition at line 283 of file yatishPlot.cpp.
|
inline |
Definition at line 38 of file yatishPlot.h.
|
inline |
Definition at line 39 of file yatishPlot.h.
|
inlineprotectedvirtual |
Reimplemented in yatishChartSerie, yatishFreeSerie, and yatishMathPlot.
Definition at line 67 of file yatishPlot.h.
|
inlinevirtual |
Reimplemented in yatishChartPie, and yatishFreePie.
Definition at line 53 of file yatishPlot.h.
|
protected |
Creates a wxString with the total hours in the current pie chart.
To be used by derived classes willing to overload the default TotalFormatted() [which returns a wxEmptyString].
Definition at line 225 of file yatishPlot.cpp.
|
staticprivate |
all timeslot records from the database
Definition at line 71 of file yatishPlot.h.
|
staticprotected |
weekly times series: various aggregates and clustered sums
Definition at line 55 of file yatishPlot.h.
|
staticprivate |
Definition at line 70 of file yatishPlot.h.
|
protected |
Definition at line 61 of file yatishPlot.h.
|
protected |
Definition at line 62 of file yatishPlot.h.
|
protected |
Definition at line 61 of file yatishPlot.h.
|
staticprotected |
names of the 3 weekly clustered sums, for the current clustering scheme
Definition at line 56 of file yatishPlot.h.
|
protected |
total durations (between firstDay
and lastDay
), in minutes
Definition at line 60 of file yatishPlot.h.
|
staticprotected |
epoch time
Definition at line 57 of file yatishPlot.h.
|
staticprotected |
week number, counted from the first year in the time series
Definition at line 58 of file yatishPlot.h.
|
staticprotected |
user selected data
Definition at line 59 of file yatishPlot.h.