Mobile API Reference  MicroStrategy 2019
BoxPlot.h
Go to the documentation of this file.
1 //=======================================================================
2 // Filename: Kernel/SourceCode/ChartEngine/PrivateSource/BoxPlot.h
3 // Date: 2009-03-02
4 // Authors: Bing Huang
5 
6 // Copyright (C) 1997-2008 MicroStrategy Incorporated
7 // All rights reserved
8 //=======================================================================
9 
10 #ifndef MsiChart_BoxPlot_h
11 #define MsiChart_BoxPlot_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 
28  unsigned char mMarkerShape;
31 
32  };
33 
34  class BoxPlot : public CategoryPlot
35  {
36  public:
38 
39  BoxPlot(const TripleId& irTripleId, GraphObjectManager* ipManager, const Rect2D& irDeviceRect);
40 
41  //virtual functions from GraphObjectManager
42  virtual void GenerateMapAndList();
43  virtual void GetOptions(Int32 iSeriesId, Int32 iPropertyId, CComVariant* opValue) const;
44 
45  //pure virtual functions from CategoryPlot
46  virtual void Init();
47  virtual void GetMinMaxValue(EnumValueAxis iValueAxis, double& iorMin, double& iorMax, bool& iorAreInitialized);
48  virtual void AddValueAxis(ValueAxis::Ptr iValueAxisPtr);
49  virtual void SetCategoryAxis(CategoryAxis::Ptr iCategoryAxisPtr);
50 
51  protected:
52 
53  private:
57  void hLoadProperties();
58 
63  void hLoadSeriesProperties(Int32 iSeriesIndex);
64 
68  void hCalBarMarkerWidthAndSpaces();
69 
78  void hGetRiserStartPosAndSize(Int32 iSeriesIndex, Int32 iGroupId, Int32& orStart, Int32& orSize);
79 
82  //bool hGetRiserRect(Int32 iSeriesIndex, Int32 iGroupId, Rect2D& orRect);
83 
91  void hCreateFiveNumberLabels(Int32 iGroupId, double iFiveNumbers[], bool iIsNull[], std::vector<GraphCollectionObject::Ptr>& irTextCollection);
92 
100  void hCreateBoxPlotBodyForGroup(Int32 iGroupId, std::vector<GraphCollectionObject::Ptr>& irRiserCollection, std::vector<GraphCollectionObject::Ptr>& irLineCollection, std::vector<GraphCollectionObject::Ptr>& irTextCollection);
101 
107  void hCreateMarkersAndLabels(std::vector<GraphCollectionObject::Ptr>& irRiserCollection, std::vector<GraphCollectionObject::Ptr>& irTextCollection);
108 
119  void hCreatelabels(Int32 iSeriesIndex, Int32 iGroupId, const double& irValue, const Point2D& irTopRight, const Point2D& irBottomLeft, bool iIsReverse, GraphCollectionObject::Ptr iCollectionPtr);
120 
128  void hGetFiveNumber(Int32 iGroupId, double ioFiveNumbers[], bool ioIsNull[]);
129 
140  void hCreateOneRectangle(Int32 iStartX, Int32 iSizeX, const double& irStartYValue, const double& irEndYValue, Int32 iSeriesId, Int32 iGroupId, GraphCollectionObject::Ptr iCollectionPtr);
141 
149  void hCreateLine(const TripleId& irTripleId, const Point2D& irStart, const Point2D& irEnd, GraphCollectionObject::Ptr iCollectionPtr);
150 
151  CategoryAxis::Ptr mCategoryAxisPtr;
152  ValueAxis::Ptr mValueAxisPtr;
153  EnumDSSBoxPlotTailShape mTailShape;
154  double mBarWidth;
155  double mMarkerWidth;
156  double mSpaceBetweenMarker;
157  double mSpaceBetweenGroupBar;
158  double mSpaceBetweenGroupMarker;
159  Int32 mSeriesCount;
160  Int32 mGroupCount;
161  Int32 mOverlap;
162  Int32 mGapWidth;
163  bool mShowLabel;
164  bool mShowValue;
165  EnumDSSGraphDataTextPosition mTextPosition;
166  ChartAdvFormat mTotalNumberFormat;
167  std::vector<BoxSeriesOptions::Ptr> mBoxSeriesOptions;
168  };
169 
170 }
171 
172 #endif
Int32 mMarkerSize
Definition: BoxPlot.h:29
Definition: BoxPlot.h:34
MSynch::SmartPtr< BoxPlot > Ptr
Definition: BoxPlot.h:37
This struct is from ChartCtrl.h.
Definition: NumberObject.h:38
MSynch::SmartPtr< BoxSeriesOptions > Ptr
Definition: BoxPlot.h:22
EnumValueAxis
Definition: Plot.h:54
Definition: CategoryPlot.h:27
virtual void SetCategoryAxis(CategoryAxis::Ptr iCategoryAxisPtr)
EnumDSSGraphDataTextPosition
Definition: DSSIPhoneEnums.h:1836
ChartAdvFormat mGraphNumberFormat
Definition: BoxPlot.h:30
EnumDSSBoxPlotTailShape
Definition: DSSIPhoneEnums.h:1895
bool mShowDataLabels
Definition: BoxPlot.h:27
unsigned char mMarkerShape
Definition: BoxPlot.h:28
#define Int32
Definition: BasicTypes.h:20
virtual void Init()
Definition: SmartPtr.h:38
virtual void GetMinMaxValue(EnumValueAxis iValueAxis, double &iorMin, double &iorMax, bool &iorAreInitialized)
virtual void GenerateMapAndList()
Definition: BoxPlot.h:20
virtual void GetOptions(Int32 iSeriesId, Int32 iPropertyId, CComVariant *opValue) const
Definition: ABLPlot.h:21
virtual void AddValueAxis(ValueAxis::Ptr iValueAxisPtr)
Definition: Msi_ccomvariant.h:24
BoxPlot(const TripleId &irTripleId, GraphObjectManager *ipManager, const Rect2D &irDeviceRect)
BoxSeriesOptions()
Definition: BoxPlot.h:24
Definition: GraphObjectManager.h:37
Use four Int32 values to represent a 2D rectangle.
Definition: Rect2D.h:25
Definition: Common.h:397