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

Pie chart for panel #3 using wxFreeChart. More...

#include <yatishPlot.h>

Collaboration diagram for yatishFreePie:
Collaboration graph
[legend]

Public Member Functions

 yatishFreePie (wxWindow *, yatishDBsqlite *)
 
void PlotData (ClusterType, AggregateType)
 Plotting interface for yatishFrame: More...
 
wxString TotalFormatted ()
 
- 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)
 

Private Attributes

wxString categories [4]
 
double data [4]
 
CategorySimpleDataset * dataset
 
ColorScheme * colorScheme
 
CategoryRenderer * renderer
 
PiePlot * plot
 
Legend * legend
 
Chart * chart
 

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 SetRangeX ()
 
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

Pie chart for panel #3 using wxFreeChart.

Note
PiePlot class documentation: "TODO: initial quick and dirty, must be cleaned up or rewritten."

Definition at line 116 of file yatishPlot.h.

Constructor & Destructor Documentation

◆ yatishFreePie()

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

Definition at line 490 of file yatishPlot.cpp.

Member Function Documentation

◆ PlotData()

void yatishFreePie::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 510 of file yatishPlot.cpp.

◆ TotalFormatted()

wxString yatishFreePie::TotalFormatted ( )
inlinevirtual

Reimplemented from yatishPlot.

Definition at line 120 of file yatishPlot.h.

Member Data Documentation

◆ categories

wxString yatishFreePie::categories[4]
private

Definition at line 122 of file yatishPlot.h.

◆ chart

Chart* yatishFreePie::chart
private

Definition at line 129 of file yatishPlot.h.

◆ colorScheme

ColorScheme* yatishFreePie::colorScheme
private

Definition at line 125 of file yatishPlot.h.

◆ data

double yatishFreePie::data[4]
private

Definition at line 123 of file yatishPlot.h.

◆ dataset

CategorySimpleDataset* yatishFreePie::dataset
private

Definition at line 124 of file yatishPlot.h.

◆ legend

Legend* yatishFreePie::legend
private

Definition at line 128 of file yatishPlot.h.

◆ plot

PiePlot* yatishFreePie::plot
private

Definition at line 127 of file yatishPlot.h.

◆ renderer

CategoryRenderer* yatishFreePie::renderer
private

Definition at line 126 of file yatishPlot.h.


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