Mobile API Reference  MicroStrategy 2019
ValuePlotManager.h
Go to the documentation of this file.
1 //====================================================================
2 // Filename: ValuePlotManager.h
3 // AUTHOR : Fangyao Ma
4 // CREATION : 02/09/09
5 // Copyright (C) MicroStrategy, Inc. 2009
6 //==============================================================================================
7 
8 #ifndef MSICHART_VALUEPLOTMANAGER_H
9 #define MSICHART_VALUEPLOTMANAGER_H
10 
11 #include "PlotManager.h"
12 #include "ValuePlot.h"
13 #include "ValueAxis.h"
14 #include "ValuePiePlot.h"
15 
16 namespace MsiChart
17 {
19  typedef enum
20  {
21  VAT_X = 0,
22  VAT_Y1 = 1,
23  VAT_Y2 = 2,
24  VAT_Z = 3,
26 
31  {
32  public:
34 
35  ValuePlotManager(const TripleId& irTripleId, GraphObjectManager* ipManager, const Rect2D& irPlotArea);
36 
37  //Re-implemention the virtual functions inherited from GraphObjectManager
38  virtual GraphObject::Ptr OnPointDetection(const Point2D& irCursor) const;
39  virtual void OnRectangleSelection(const Rect2D& irRect, std::vector<GraphObject::Ptr>& iorSelectedObjects) const;
40  virtual void Draw();
41  virtual void GenerateView();
42  virtual void GenerateImageMap(ImageMap& iorImageMap);
43  virtual void GenerateMapAndList();
44  protected:
48  virtual void LoadProperties();
49 
50  private:
56  void hReserveVerticalArea(const Rect2D& irDataArea, Rect2D& orDataArea);
57 
63  void hReserveHorizontalArea(const Rect2D& irDataArea, Rect2D& orDataArea);
64 
65  bool hIsDualAxis();
66 
71  bool hIsMultipleYAxis();
72 
79  void hGetMinMaxValueWithChartArea(Int32 iChartAreaID, EnumValueAxisType iVAType, double& orMin, double& orMax);
80 
86  void hSetDataAreaValueAxis(const Rect2D& irChartArea, Int32 iAxisId);
87 
88 
94  ValueAxis::Ptr hGetValueAxisPtr(Int32 iChartAreaID, Int32 iVAType);
95 
100  bool hCheckDataset();
101 
102  /*
103  * Generate the axis line for all axes
104  */
105  void hGenerateAxisLines();
106 
107  /*
108  * Generate the grid line for all axes
109  */
110  void hGenerateGridLines(const std::vector<Rect2D>& irChartAreas);
111 
112  /*
113  * Generate the interlaced grids for all axes
114  */
115  void hGenerateInterlacedGrids(const std::vector<Rect2D>& irChartAreas);
116 
117 
118  //private data members
119  std::vector<Plot::Ptr> mVecValuePlot;
120  std::vector<ValueAxis::Ptr> mVecXAxis;
121  std::vector<ValueAxis::Ptr> mVecY1Axis;
122  std::vector<ValueAxis::Ptr> mVecY2Axis;
123  std::vector<ValueAxis::Ptr> mVecZAxis;
124 
125  std::vector<Int32> mVecSeriesVAIndex;
126  };
127 }
128 
129 #endif
Definition: ValuePlotManager.h:23
Definition: ValuePlotManager.h:22
virtual void OnRectangleSelection(const Rect2D &irRect, std::vector< GraphObject::Ptr > &iorSelectedObjects) const
virtual void GenerateMapAndList()
virtual void LoadProperties()
Definition: ValuePlotManager.h:30
#define Int32
Definition: BasicTypes.h:20
Definition: ValuePlotManager.h:24
ValuePlotManager(const TripleId &irTripleId, GraphObjectManager *ipManager, const Rect2D &irPlotArea)
Definition: ValuePlotManager.h:21
Definition: SmartPtr.h:38
virtual void GenerateImageMap(ImageMap &iorImageMap)
EnumValueAxisType
Define value axis type.
Definition: ValuePlotManager.h:19
Definition: ABLPlot.h:21
std::vector< AreaRec * > ImageMap
Definition: ImageMap.h:99
virtual void GenerateView()
MSynch::SmartPtr< ValuePlotManager > Ptr
Definition: ValuePlotManager.h:33
virtual GraphObject::Ptr OnPointDetection(const Point2D &irCursor) const
Definition: GraphObjectManager.h:37
Use four Int32 values to represent a 2D rectangle.
Definition: Rect2D.h:25
Definition: PlotManager.h:43
Definition: Common.h:397