YATiSh
Yet Another TIme SHeet
Public Member Functions | Private Member Functions | Private Attributes | List of all members
yatishChartSerie Class Reference

Time series for panel #3 using wxCharts. More...

#include <yatishPlot.h>

Collaboration diagram for yatishChartSerie:
Collaboration graph
[legend]

Public Member Functions

 yatishChartSerie (wxWindow *, yatishDBsqlite *)
 
void PlotData (ClusterType, AggregateType)
 Plotting interface for yatishFrame: More...
 
- Public Member Functions inherited from yatishPlot
 yatishPlot (yatishDBsqlite *)
 The constructor of yatishPlot: More...
 
virtual ~yatishPlot ()
 
void SetFirstDay (const wxDateTime &dt)
 
void SetLastDay (const wxDateTime &dt)
 
virtual wxString TotalFormatted ()
 

Private Member Functions

void ResetChart ()
 
void CreateChart ()
 
void SetRangeX ()
 

Private Attributes

wxBoxSizer * panelSizer
 
wxVector< wxString > labels
 
wxVector< wxDouble > points [3]
 
wxChartsCategoricalData::ptr chartData
 
wxChartsDoubleDataset * data [3]
 
wxChartsDoubleDataset::ptr dataset [3]
 
wxLineChartCtrl * lineChartCtrl
 
wxChartsLegendCtrl * legendCtrl
 
bool lineChartON
 
bool legendON
 
ClusterType currentClusters
 

Additional Inherited Members

- Protected Member Functions inherited from yatishPlot
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 ClearCurves ()
 
- Protected Attributes inherited from yatishPlot
Map4pie pieData
 total durations (between firstDay and lastDay), in minutes More...
 
wxDateTime firstDay
 
wxDateTime lastDay
 
AggregateType formerAggregate
 
- Static Protected Attributes inherited from yatishPlot
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...
 

Detailed Description

Time series for panel #3 using wxCharts.

Note
Nice plots but poor interface: must (re)create everything to modify a plot.
No data argument in wxTimeSeriesChartCtrl() [=>sample timeseries is empty!], hence a wxLineChartCtrl using week number on the bottom axis.
See also
yatishFreeSerie

Definition at line 138 of file yatishPlot.h.

Constructor & Destructor Documentation

◆ yatishChartSerie()

yatishChartSerie::yatishChartSerie ( wxWindow *  p,
yatishDBsqlite pdb 
)

Definition at line 533 of file yatishPlot.cpp.

Member Function Documentation

◆ CreateChart()

void yatishChartSerie::CreateChart ( )
private

Definition at line 575 of file yatishPlot.cpp.

◆ PlotData()

void yatishChartSerie::PlotData ( ClusterType  ,
AggregateType   
)
virtual

Plotting interface for yatishFrame:

  • computes data that depends on the time window;
  • updates the plot selected by the user (in controls of panel #3).
Parameters
[in]clustersthe clusters to compute and show; default: none
[in]aggregateif clusters are not used, the aggregate to show; default: hoursTotal
Note
PlotData() is supposed to be called when something has changed (at least the time window).
Todo:

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)

Implements yatishPlot.

Definition at line 541 of file yatishPlot.cpp.

◆ ResetChart()

void yatishChartSerie::ResetChart ( )
private

Definition at line 556 of file yatishPlot.cpp.

◆ SetRangeX()

void yatishChartSerie::SetRangeX ( )
privatevirtual

Reimplemented from yatishPlot.

Definition at line 601 of file yatishPlot.cpp.

Member Data Documentation

◆ chartData

wxChartsCategoricalData::ptr yatishChartSerie::chartData
private

Definition at line 146 of file yatishPlot.h.

◆ currentClusters

ClusterType yatishChartSerie::currentClusters
private

Definition at line 152 of file yatishPlot.h.

◆ data

wxChartsDoubleDataset* yatishChartSerie::data[3]
private

Definition at line 147 of file yatishPlot.h.

◆ dataset

wxChartsDoubleDataset::ptr yatishChartSerie::dataset[3]
private

Definition at line 148 of file yatishPlot.h.

◆ labels

wxVector<wxString> yatishChartSerie::labels
private

Definition at line 144 of file yatishPlot.h.

◆ legendCtrl

wxChartsLegendCtrl* yatishChartSerie::legendCtrl
private

Definition at line 150 of file yatishPlot.h.

◆ legendON

bool yatishChartSerie::legendON
private

Definition at line 151 of file yatishPlot.h.

◆ lineChartCtrl

wxLineChartCtrl* yatishChartSerie::lineChartCtrl
private

Definition at line 149 of file yatishPlot.h.

◆ lineChartON

bool yatishChartSerie::lineChartON
private

Definition at line 151 of file yatishPlot.h.

◆ panelSizer

wxBoxSizer* yatishChartSerie::panelSizer
private

Definition at line 143 of file yatishPlot.h.

◆ points

wxVector<wxDouble> yatishChartSerie::points[3]
private

Definition at line 145 of file yatishPlot.h.


The documentation for this class was generated from the following files: