Version: 0.6.0
dateaxis.h
1 // Name: dateaxis.h
3 // Purpose: Date/time axis declaration
4 // Author: Moskvichev Andrey V.
5 // Created: 2008/11/07
6 // Copyright: (c) 2008-2010 Moskvichev Andrey V.
7 // Licence: wxWidgets licence
9 
10 #ifndef DATEAXIS_H_
11 #define DATEAXIS_H_
12 
13 #include <wx/axis/labelaxis.h>
14 
15 
21 class WXDLLIMPEXP_FREECHART DateAxis : public LabelAxis
22 {
23  DECLARE_CLASS(DateAxis)
24 public:
25  DateAxis(AXIS_LOCATION location);
26  virtual ~DateAxis();
27 
28  virtual void UpdateBounds();
29 
34  void SetDateFormat(const wxString &dateFormat)
35  {
36  m_dateFormat = dateFormat;
37  FireAxisChanged();
38  }
39 
40  virtual void GetDataBounds(double &minValue, double &maxValue) const;
41 
42 protected:
43  virtual bool AcceptDataset(Dataset *dataset);
44 
45  //
46  // LabelAxis
47  //
48  virtual double GetValue(size_t step);
49 
50  virtual void GetLabel(size_t step, wxString &label);
51 
52  virtual bool IsEnd(size_t step);
53 
54  virtual wxSize GetLongestLabelExtent(wxDC &dc);
55 
56 private:
57  size_t m_dateCount;
58 
59  wxString m_dateFormat;
60 };
61 
62 #endif /*DATEAXIS_H_*/
virtual void UpdateBounds()=0
void SetDateFormat(const wxString &dateFormat)
Definition: dateaxis.h:34
virtual bool IsEnd(size_t step)=0
Definition: labelaxis.h:27
virtual bool AcceptDataset(Dataset *dataset)=0
virtual double GetValue(size_t step)=0
virtual void GetDataBounds(double &minValue, double &maxValue) const =0
virtual void GetLabel(size_t step, wxString &label)=0
Definition: dateaxis.h:21
Definition: dataset.h:50