Mobile API Reference  MicroStrategy 2019
GanttPlot.h
Go to the documentation of this file.
1 //=======================================================================
2 // Filename: Kernel/SourceCode/ChartEngine/PrivateSource/GanttPlot.h
3 // Date: 2009-02-05
4 // Authors: Bing Huang
5 
6 // Copyright (C) 1997-2008 MicroStrategy Incorporated
7 // All rights reserved
8 //=======================================================================
9 
10 #ifndef MsiChart_GanttPlot_h
11 #define MsiChart_GanttPlot_h
12 
13 #include "CategoryPlot.h"
14 #include "CategoryAxis.h"
15 #include "ValueAxis.h"
16 
17 namespace MsiChart
18 {
19  //enumerations and structs
21  {
23 
25  {}
26 
30  };
31 
32  class GanttPlot : public CategoryPlot
33  {
34  public:
36 
37  GanttPlot(const TripleId& irTripleId, GraphObjectManager* ipManager, const Rect2D& irDeviceRect);
38 
39  //virtual functions from GraphObjectManager
40  virtual void GenerateMapAndList();
41  virtual void GetOptions(Int32 iSeriesId, Int32 iPropertyId, CComVariant* opValue) const;
42  virtual void Draw();
43  virtual void GenerateView();
44 
45  //override functions
46  virtual GraphObject::Ptr OnPointDetection(const Point2D& irCursor) const;
47  virtual void OnRectangleSelection(const Rect2D& irRect, std::vector<GraphObject::Ptr>& iorSelectedObjects) const;
48 
49  //pure virtual functions from CategoryPlot
50  virtual void Init();
51  virtual void GetMinMaxValue(EnumValueAxis iValueAxis, double& iorMin, double& iorMax, bool& iorAreInitialized);
52  virtual void AddValueAxis(ValueAxis::Ptr iValueAxisPtr);
53  virtual void SetCategoryAxis(CategoryAxis::Ptr iCategoryAxisPtr);
54 
55  protected:
56 
57  private:
61  void hLoadProperties();
62 
67  void hLoadSeriesProperties(Int32 iSeriesIndex);
68 
74  void hCreateRisersAndLabels(std::vector<GraphCollectionObject::Ptr>& irRiserCollection, std::vector<GraphCollectionObject::Ptr>& irTextCollection);
75 
79  void hCalBarWidthAndSpaces();
80 
89  void hGetRiserStartPosAndSize(Int32 iSeriesIndex, Int32 iGroupId, Int32& orStart, Int32& orSize);
90 
98  void hGetLogicalMiddlePosition(Int32 iSeriesIndex, Int32 iGroupId, double& orPosition) const;
99 
106  bool hGetRiserRect(Int32 iSeriesIndex, Int32 iGroupId, Rect2D& orRect);
107 
111  void hCreateAllSeriesTrendLine();
112 
119  bool hGetTrendLinePoint(Int32 iSeriesIndex, Int32 iGroupId, Point<double>& orPoint);
120 
129  bool hGetStartAndLength(Int32 iSeriesIndex, Int32 iGroupId, double& iorStart, double& iorLength) const;
130 
131  CategoryAxis::Ptr mCategoryAxisPtr;
132  ValueAxis::Ptr mValueAxisPtr;
133  double mBarWidth;
134  double mSpaceBetweenRiser;
135  double mSpaceBetweenGroup;
136  double mGroupSize;
137  Int32 mSeriesCount;
138  Int32 mGroupCount;
139  Int32 mOverlap;
140  Int32 mGapWidth;
141  bool mUseDepth;
142  Int32 mDepth;
143  Int32 mDepthDirection;
144  bool mShowLabel;
145  bool mShowValue;
146  EnumDSSGraphDataTextPosition mTextPosition;
147  ChartAdvFormat mTotalNumberFormat;
148  std::vector<GanttSeriesOptions::Ptr> mGanttSeriesOptions;
149  };
150 
151 }
152 
153 #endif
virtual void GenerateMapAndList()
virtual void GetOptions(Int32 iSeriesId, Int32 iPropertyId, CComVariant *opValue) const
MSynch::SmartPtr< GanttSeriesOptions > Ptr
Definition: GanttPlot.h:22
Definition: GanttPlot.h:20
This struct is from ChartCtrl.h.
Definition: NumberObject.h:38
EnumValueAxis
Definition: Plot.h:54
Definition: CategoryPlot.h:27
EnumDSSGraphDataTextPosition
Definition: DSSIPhoneEnums.h:1836
GanttSeriesOptions()
Definition: GanttPlot.h:24
virtual void SetCategoryAxis(CategoryAxis::Ptr iCategoryAxisPtr)
virtual void Draw()
MSynch::SmartPtr< GanttPlot > Ptr
Definition: GanttPlot.h:35
virtual void OnRectangleSelection(const Rect2D &irRect, std::vector< GraphObject::Ptr > &iorSelectedObjects) const
#define Int32
Definition: BasicTypes.h:20
virtual GraphObject::Ptr OnPointDetection(const Point2D &irCursor) const
Definition: GanttPlot.h:32
GraphTrendLineOptions mTrendLineOptions
Definition: GanttPlot.h:28
Definition: SmartPtr.h:38
virtual void Init()
Definition: ABLPlot.h:21
virtual void AddValueAxis(ValueAxis::Ptr iValueAxisPtr)
bool mShowDataLabels
Definition: GanttPlot.h:27
GanttPlot(const TripleId &irTripleId, GraphObjectManager *ipManager, const Rect2D &irDeviceRect)
Definition: Msi_ccomvariant.h:24
virtual void GenerateView()
virtual void GetMinMaxValue(EnumValueAxis iValueAxis, double &iorMin, double &iorMax, bool &iorAreInitialized)
ChartAdvFormat mGraphNumberFormat
Definition: GanttPlot.h:29
Definition: GraphObjectManager.h:37
Use four Int32 values to represent a 2D rectangle.
Definition: Rect2D.h:25
Definition: Plot.h:30
Definition: Common.h:397