Version: 0.6.0
xydataset.h
1 // Name: xydataset.h
3 // Purpose: xy dataset declarations
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 XYDATASET_H_
11 #define XYDATASET_H_
12 
13 #include <wx/dataset.h>
14 #include <wx/axis/axis.h>
15 
16 class XYRenderer;
17 
21 class WXDLLIMPEXP_FREECHART XYDataset : public Dataset
22 {
23  DECLARE_CLASS(XYDataset)
24 public:
25  XYDataset();
26  virtual ~XYDataset();
27 
28  XYRenderer *GetRenderer()
29  {
30  return (XYRenderer *) m_renderer;
31  }
32 
38  virtual double GetX(size_t index, size_t serie) = 0;
39 
45  virtual double GetY(size_t index, size_t serie) = 0;
46 
51  virtual double GetMaxY();
52 
57  virtual double GetMinY();
58 
63  virtual double GetMaxX();
64 
69  virtual double GetMinX();
70 
71 
72  virtual double GetMinValue(bool verticalAxis);
73 
74  virtual double GetMaxValue(bool verticalAxis);
75 
76 
77 protected:
78  virtual bool AcceptRenderer(Renderer *r);
79 
80 private:
81 };
82 
83 //
84 // Helper functions.
85 //
86 void ClipHoriz(Axis *axis, double &x, double &y, double x1, double y1);
87 
88 void ClipVert(Axis *axis, double &x, double &y, double x1, double y1);
89 
90 #endif /*XYDATASET_H_*/
Definition: chartrenderer.h:21
virtual double GetMinValue(bool vertical)=0
Definition: axis.h:62
virtual double GetMaxValue(bool vertical)=0
Definition: dataset.h:50
virtual bool AcceptRenderer(Renderer *r)=0
Definition: xydataset.h:21
Definition: xyrenderer.h:20