wxFreeChart
xyhistorenderer.h
1 // Name: xyhistorenderer.h
3 // Purpose: xy histogram renderer 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 XYHISTORENDERER_H_
11 #define XYHISTORENDERER_H_
12 
13 #include <wx/xy/xyrenderer.h>
14 #include <wx/areadraw.h>
15 
19 class WXDLLIMPEXP_FREECHART XYHistoRenderer : public XYRenderer
20 {
21  DECLARE_CLASS(XYHistoRenderer)
22 public:
28  XYHistoRenderer(int barWidth = 10, bool vertical = true);
29  virtual ~XYHistoRenderer();
30 
31  virtual void Draw(wxDC &dc, wxRect rc, Axis *horizAxis, Axis *vertAxis, XYDataset *dataset);
32 
39  void SetBarArea(size_t serie, AreaDraw *barArea);
40 
46  AreaDraw *GetBarArea(size_t serie);
47 
48  //
49  // DrawObserver
50  //
51  virtual void NeedRedraw(DrawObject *obj);
52 
53 private:
54  void DrawBar(int serie, wxDC &dc, wxRect rcData, wxCoord x, wxCoord y);
55 
56  int m_barWidth;
57  bool m_vertical;
58 
59  wxCoord m_serieShift;
60 
61  AreaDrawCollection m_barAreas;
62 };
63 
64 #endif /*XYHISTORENDERER_H_*/
virtual void Draw(wxDC &dc, wxRect rc, Axis *horizAxis, Axis *vertAxis, XYDataset *dataset)=0
Draws dataset.
Base class for all XYDataset renderers.
Definition: xyrenderer.h:20
Collection of areadraws for series.
Definition: areadraw.h:179
Base class for objects drawn on chart or perform drawing of another objects (like renderers...
Definition: drawobject.h:22
Base class for all axes.
Definition: axis.h:39
Renderer for displaying XY data as histograms.
Base class for XY datasets.
Definition: xydataset.h:21
Base class for drawing area background.
Definition: areadraw.h:22