wxFreeChart
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  virtual double GetMinValue(bool verticalAxis);
72 
73  virtual double GetMaxValue(bool verticalAxis);
74 
75 
76 protected:
77  virtual bool AcceptRenderer(Renderer *r);
78 
79 private:
80 };
81 
82 //
83 // Helper functions.
84 //
85 void ClipHoriz(Axis *axis, double &x, double &y, double x1, double y1);
86 
87 void ClipVert(Axis *axis, double &x, double &y, double x1, double y1);
88 
89 #endif /*XYDATASET_H_*/
virtual double GetMaxValue(bool vertical)=0
Returns maximal value.
Base class for all renderers.
Definition: chartrenderer.h:21
Base class for all XYDataset renderers.
Definition: xyrenderer.h:20
Base class for all axes.
Definition: axis.h:39
virtual bool AcceptRenderer(Renderer *r)=0
Checks whether renderer is acceptable by this dataset.
Base class for all datasets (XYDatasets, XYZDatasets, CategoryDatasets, OHLCDatasets, etc).
Definition: dataset.h:39
Base class for XY datasets.
Definition: xydataset.h:21
virtual double GetMinValue(bool vertical)=0
Returns minimal value.