Mobile API Reference  MicroStrategy 2019
Chart.h
Go to the documentation of this file.
1 //==============================================================================================
2 // FILENAME : Chart.h
3 // AUTHOR : Xin Liu
4 // CREATION : 5/20/08
5 // Copyright (C) MicroStrategy, Inc. 2008
6 //==============================================================================================
7 
8 
9 #ifndef MSICHART_CHART_H
10 #define MSICHART_CHART_H
11 #include "Dataset.h"
12 #include "PrivateSource/FormatManager.h"
13 #ifndef _VE_CE
14 #include "CoreGraphics/CoreGraphics.h"
15 #else
16 #include "VisualizationEngine/ChartEngine/JSON/JSONCanvas.h"
17 #include "VisualizationEngine/ChartEngine/CEOutput/CECanvas.h"
18 #endif
19 #include "PrivateSource/ImageMap.h"
20 #include "Common.h"
21 #include "PrivateSource/Point2D.h"
22 
23 class DSSRWTemplateNode;
24 namespace MsiChart
25 {
26 
27  //Goal: We want to enahnce the generic data organization in the txt file, so...
28  typedef enum
29  {
33  }GenericInputType; //Added by dshi
34 
35  struct RefreshPack
36  {
38  std::map<Int32, std::pair<double, double> > mValueAxisScaleSet; //x DssGraphX1Body; y1 DssGraphY1Body; y2 DssGraphY2Body
39  };
40 
41  typedef enum
42  {
46 
47  typedef std::vector<std::pair<std::string, std::string> > GraphTooltipDataProvider;
48  typedef std::pair<int, std::pair<double, double> > GraphMatrixMinMaxInfo;
49 
50  struct Tooltip
51  {
52  Tooltip(Int32 iDataPointX,
53  Int32 iDataPointY,
54  Int32 iNumOfValues,
55  Int32 iSeriesId,
56  Int32 iGroupId,
57  int iSeriesColor,
58  const char* ipDataString,
59  const char* ipCategoryName,
60  const char* ipSeriesName,
61  const char* ipExDataString1,
62  const char* ipExDataString2,
63  const char* ipConcatenatedString)
64  : mDataPointX(iDataPointX),
65  mDataPointY(iDataPointY),
66  mNumOfValues(iNumOfValues),
67  mSeriesId(iSeriesId),
68  mGroupId(iGroupId),
69  mSeriesColor(iSeriesColor),
70  mDataString(ipDataString),
71  mCategoryName(ipCategoryName),
72  mSeriesName(ipSeriesName),
73  mExDataString1(ipExDataString1),
74  mExDataString2(ipExDataString2),
75  mConcatenatedString(ipConcatenatedString)
76  {
77  mObjectId = -3;
78  mSliceIndex = mAngleIndex = -3;
79  mIsReferenceLine = false;
80  mRefrenceLineValue = "";
81  }
82 
84  {
86  mObjectId = -3;
87  mSliceIndex = mAngleIndex = -3;
88  mIsReferenceLine = false;
89  mRefrenceLineValue = "";
90  }
91 
92  void Serieslise(std::vector<int>& orVect)
93  {
94  orVect.clear();
95  orVect.push_back(mObjectId);
96  orVect.push_back(mSeriesId);
97  orVect.push_back(mGroupId);
98  }
99 
100  Int32 mDataPointX; //< DataPoint to show tooltip for all graph types, and infowindow for all graphtypes except budgeting chart.
107  Int32 mObjectId; //used in [rotation] to keep the last selected objects.
108  int mSeriesColor; // 0xbbggrr
109  std::string mDataString;
110  std::string mCategoryName;
111  std::string mSeriesName;
112  std::string mExDataString1;
113  std::string mExDataString2;
114  std::string mConcatenatedString;
115 
116  std::vector<std::string> mCategoryNames;
117  std::vector<std::string> mRowLabels;
118  std::vector<std::vector<std::string> > mColLabels;
119  std::vector<std::string> mMetricsValues;
120  std::string mAxisLabelString;
121  std::string mSizeByDataString;
122  std::string mPercentValueString;
124  std::vector<Int32> mRectInfo; //< The rect info for the selected object.set = (x,y, half width, half height).
125  std::vector<Int32> mPolygonInfo; //< The polygon info to be highlighted for sizeby line chart in selection mode.
127  std::string mRefrenceLineValue;
128  void ToDataProvider(GraphTooltipDataProvider& orDataProvider, Int32 iStyleIndex);
129  };
130 
132  {
133  SelectedInfo(TripleId iId, Int32 iShape, bool iIsIsolatedDot)
134  : mSelectedId(iId),
135  mShapeType(iShape),
136  mIsIsolatedDot(iIsIsolatedDot)
137  {
138 
139  }
140 
142  {
143  }
144 
148  };
149 
155  struct AxisLabelInfoMap;
156  struct GraphMatrixContext;
157  class Chart
158  {
159  public:
160 
164  virtual void Delete() = 0;
165 
166  //Setting/Getting Data
167 
172  virtual void SetData(Dataset::Ptr iDatasetPtr) = 0;
173 
178  virtual Dataset::Ptr GetData() = 0;
179 
188  virtual bool GetToolTipData(Int32 iSeriesID, Int32 iGroupID, double& orValue, double& orPercentValue, Int32 iOffset = 0) = 0;
189 
197  virtual bool GetToolTipDataString(Int32 iSeriesID, Int32 iGroupID, MBase::String& orDataString, Int32 iOffset = 0) = 0;
198  virtual bool GetToolTipDataString(Int32 iSeriesID, Int32 iGroupID, MBase::String& orDataString, MBase::String& orPercentDataString, Int32 iOffset = 0) = 0;
199 
200  virtual bool GetPieSliceTooltipDataString(Int32 iSeriesID, Int32 iGroupID, Int32 iAngleID, Int32 iSliceID, Int32 iColumnOffset, MBase::String& orDataString) = 0;
201 
202  //Used in GraphMatrix to get the colorby or sizeby data.
203  virtual bool GetPrimaryDataString(Int32 iSeriesID, Int32 iGroupID, MBase::String& orDataString, bool iIsForColor, Int32 iSizebyIndex = 0) = 0;
204  virtual bool GetPrimaryDataStringForPie(Int32 iSeriesId, Int32 iGroupID, MBase::String& orDataString, bool iIsForColor, Int32 iColumnOffset = 0, bool isPercentValue = false, Int32 iAngleIndex = -3, Int32 iSlcieIndex = -3) = 0;
208  virtual bool IsInitialized() const = 0;
209 
210  //Setting/Getting Attributes
211 
221  virtual bool SetOptions(Int32 iObjectId, Int32 iSeriesId, Int32 iGroupId,
222  Int32 iPropertyId, CComVariant* ipValue) = 0;
223 
233  virtual bool GetOptions(Int32 iObjectId, Int32 iSeriesId, Int32 iGroupId,
234  Int32 iPropertyId, CComVariant* opValue) = 0;
235 
240  //virtual void SetGraphStyle(GraphStyleWrapper::Ptr iGraphStyleWrapperPtr) = 0;
241 
246  virtual void SetGraphType(short iGraphType) = 0;
247 
252  virtual void GetGraphType(short& orGraphType) = 0;
253 
258  virtual void SetAdvancedChartTypeSupport(bool iAdvancedChartTypeSupport) = 0;
259 
264  virtual Int32 GetGraphWidth() const = 0;
265 
270  virtual Int32 GetGraphHeight() const = 0;
271 
272  virtual void SetCurrentGraphFrame(Int32 iX, Int32 iY, Int32 iWidth, Int32 iHeight) = 0;
273 
278  virtual void SetChartComponent(Int32 iChartComponent) = 0;
279 
283  virtual Int32 GetDataAreaSplitX() const = 0;
284 
288  virtual Int32 GetDataAreaSplitY() const = 0;
289 
293  virtual void SetDataAreaSplitX(Int32 iXCoord) = 0;
294 
295  //User Interactivity
296 
309  virtual bool OnPointDetection(Int32 iX, Int32 iY, bool iSmartSelection, TripleId& orSelectedObject) = 0;
310 
320  virtual bool GetNearestObject(Int32 iX, Int32 iY, const std::vector<Int32>& irObjectIds,Int32 iRadius, TripleId& orNearestTripleId, int* opNearestDistance = NULL) = 0;
321 
331  virtual bool GetNearestObjectForGMCombo(Int32 iX, Int32 iY, const std::vector<Int32>& irObjectIds,Int32 iRadius, TripleId& orNearestTripleId, int* opNearestDistance) = 0;
332  virtual bool GetAllObjectsWithInDistance(Int32 iX, Int32 iY, const std::vector<Int32>& irObjectIds, Int32 iRadius, std::vector<SelectedInfo>& orNearObjects, std::vector<Int32>& orDistance) = 0;
333 
343  virtual bool OnRectangleSelection(Int32 iLeft, Int32 iTop, Int32 iWidth, Int32 iHeight,
344  bool iSmartSelection, TripleId*& orpSelectionList, Int32 &oNum) = 0;
345 
351  virtual bool IsInSelectionList(const TripleId& iObject) = 0;
352 
358  virtual bool AddToSelectionList(const TripleId& iObject) = 0;
359 
365  virtual bool RemoveFromSelectionList(const TripleId& iObject) = 0;
366 
370  virtual void ClearSelectionList() = 0;
371 
377  virtual void AllocSelectionList(TripleId*& orpSelectionList, Int32 &oNum) = 0;
378 
382  virtual void DisposeSelectionList(TripleId* ipSelectionList) = 0;
383 
384  //Export
385 
395  virtual bool SaveImageToMemory(Int32 iWidth, Int32 iHeight, Int32 iFormat,
396  char*& oprMemory, unsigned Int32& oSize) = 0;
397 
406  virtual bool SaveImageToFile(Int32 iWidth, Int32 iHeight,
407  Int32 iFormat, const char* ipFilename) = 0;
408 
412  //virtual bool SaveImageToSurface(cairo_surface_t * ipSurface, Int32 iWidth, Int32 iHeight) = 0;
413 #ifdef _VE_CE
414  virtual bool SaveImageToString(Int32 iWidth, Int32 iHeight, std::string& orGraphDesc,
415  bool ibRowsHaveControls, bool ibColumnsHaveControls, bool ibHasMetricSelector,
416  std::vector<std::pair<Int32, Int32> >& iSelectedSeriesAndColumns,
417  bool ibSkipRendering = true) = 0;
418  virtual bool SaveImageToVEObjects(Int32 iWidth, Int32 iHeight,
419  std::vector<MVE::VEFormatList>& ioFormatList, std::vector<MVE::VEUnitList>& ioUnitList,
420  bool ibRowsHaveControls, bool ibColumnsHaveControls, bool ibHasMetricSelector,
421  std::vector<std::pair<Int32, Int32> >& iSelectedSeriesAndColumns,
422  bool ibSkipRendering = true) = 0;
423 
424  virtual void SetCanvas(ChartCanvas* ipCanvas) = 0;
425  virtual ChartCanvas* GetCanvas() = 0;
426 #else
427 
434  virtual bool SaveImageToCGContext(CGContext* ipCGContext, Int32 iWidth, Int32 iHeight, bool iShowValueAxis = true, Int32 iImageUsage = IU_GENERAL) = 0;
435 #endif
436 
444  virtual bool GenerateImageMap(Int32 iWidth, Int32 iHeight, ImageMap& oImageMap) = 0;
445 
446  //Graph Imaging
447 
454  virtual bool PlainDraw(Int32 iWidth, Int32 iHeight) = 0;
455 #ifndef _VE_CE
456 
460  virtual void SetCGContext(CGContext* ipCGContext) = 0;
461 
462  // Categorya X axis special handle for partial rendering
463  virtual void SetIsCategoryXAxisForPartialRendering(bool isForPartialRendering) = 0;
464 #endif
465 
471  virtual Int32 GetChartAreaId(const TripleId& iObject) = 0;
472 
473  //Misc, tranformation bewteen device coordinate and 3DG virtual coordinate
474 
480  virtual void DeviceToVirtualPoint(Int32& iorX, Int32& iorY) const = 0;
481 
487  virtual void VirtualToDevicePoint(Int32& iorX, Int32& iorY) const = 0;
488 
494  virtual Int32 GetDataGroup(bool& orIgnoreForNoSeriesOrGroup) const = 0;
495 
500  virtual void GetAxisNumberFormat(CComVariant* opValue) const = 0;
501 
502 
509  virtual void OnZooming(Int32 iOldStart, Int32 iOldEnd, Int32 iNewStart, Int32 iNewEnd, bool iIsVertical) = 0;
510 
515  virtual void OnZoomingByGroupRange(double iStartGroup, double iEndGroup) = 0;
516 
520  virtual void OnZoomRestore() = 0;
521 
526  virtual void OnSwipingOutOfZoom(Int32 iOffset) = 0;
532  virtual void OnSwipingInZoom(Int32 iX, Int32 iY) = 0;
533 
538  virtual Int32 GetLastGroupId() = 0;
539 
546  virtual bool GetPositionById(Int32 iSeriesId, Int32 iGroupId, Int32& orX, Int32& orY) = 0;
547 
552  virtual void ResetGroupRangeAndAxesState(Int32 iBeginGroup, Int32 iEndGroup) = 0;
553 
558  virtual double GetGroupIntervalInPixel() = 0;
559 
569  virtual void GetGroupLabel(Int32 iGroupId, MBase::String& orGroupLabel, const wchar_t iSeparator, bool iIsAbbreviated) = 0;
570 
571 
581  virtual void GetSeriesLabel(Int32 iSeriesID,MBase::String& orSeriesLabel, bool iSubstitute = true, Int32 iColumnOffset = 0, bool iIsForSlice = true) = 0;
582 
591  virtual Tooltip* CreateToolTipBySeriesAndGroup(Int32 iSeriesID, Int32 iGroupID, bool iPersistent = false) = 0;
592 
602  virtual unsigned Int32 GetToolTipByCoords(Int32 iX, Int32 iY, std::vector<Tooltip*>& orTooltips, bool iPersistent = false) = 0;
603  virtual unsigned Int32 GetToolTipByCoords(Int32 iX, Int32 iY, std::vector<Tooltip*>& orTooltips, Int32 iDetectiveRadius, bool iPersistent = false) = 0;
604 
613  virtual Int32 CreateTooltipByObject(TripleId* ipSelectionList, Int32 iNum, std::vector<Tooltip*>& orTooltips, bool iPersistent = false) = 0;
614  virtual Int32 CreateTooltipByObject(const std::vector<TripleId>& irSelectionList, std::vector<Tooltip*>& orTooltips, bool iPersistent = false) = 0;
615 
621  virtual bool CanShowTooltipById(TripleId& irId) const = 0;
622 
629  virtual int GetDataPointForUIMenu(Int32 iX, Int32 iY, Tooltip& ioTooltip, bool iLSMode = false) = 0;
630 
631  // get the number of selected objects
632  virtual int GetNumOfSelectedObjects() = 0;
633 
634  // get selected objects
635  virtual int ApplySelectedObjects(Int32 iX, Int32 iY, std::vector<Point2D>& iPoints, Point2D& ioPoint)= 0;
636 
640  virtual bool OnHover(Int32 iX, Int32 iY) = 0;
641  virtual bool OnHover(Int32 iX, Int32 iY, Int32 iDistance) = 0;
642 
643  virtual void SetChartOffset(Int32 iXOffset, Int32 iYOffset) = 0;
644 
645  virtual void HighlightOrHideOneObject(const TripleId irTripleId, bool iIsHide) = 0;
646  virtual void HighlightOrHideObjects(const std::vector<TripleId>& irTripleIds, bool iIsHide) = 0;
647  virtual bool OnHover(const TripleId& irHoverObject) = 0;
648 
649  virtual bool ClearOneHighlightObject(MsiChart::TripleId iTripleId) = 0;
653  virtual bool GetHoveredObject(TripleId& orHoveredObject, Int32 iIndex = 0) = 0;
654 
655  virtual bool GetHoveredLineObject(TripleId& orHoveredLineObject, Int32 iIndex = 0) = 0;
656 #ifndef _VE_CE
657  /*
658  */
659  virtual void GetAllGraphObjectInfo(std::vector<CGRect> &iAllGraphObjectsBorder, std::vector<MsiChart::TripleId > &iAllGraphObjectsTripleId) = 0;
660 #endif
661  // Actually zoom scale info in GM
662  virtual void SetGMZoomScale(float iHeightScale, float iWidthScale) = 0;
663 
668  virtual void GetShownNumericTicks(std::set<double>& orTicksSet, bool iIsForXAxis) = 0;
669 
670  virtual void SetShowNumbericTicks(std::set<double>& irTicksSet, bool iIsForXAxis) = 0;
671 
672  virtual void GetStaggerLabelEndLevel(Int32& orLabelEndLevel) = 0;
673  virtual void SetStaggerLabelStartLevel(Int32 irLabelStartLevel) = 0;
674 
675  virtual void SetCategoryAxisLabelInterval(Int32 irLabelInterval) = 0;
676  virtual Int32 GetCategoryAxisLabelInterval() = 0;
677 
682  virtual void SetXAxisLogicalRange(double iXLogicalStart, double iXLogicalEnd) = 0;
683 
688  virtual void EnableVoiceOver(bool iIsVoiceOverMode) = 0;
689 
694  virtual void EnableTimeSeriesChart(bool iIsTimeSeriesChart) = 0;
699  virtual void EnableMicroChart(bool iIsMicroChart) = 0;
700 
701 
706  virtual void SetTimeSeriesIntegrity(Int32 iIntegrity) = 0;
707 
712  virtual void EnableGraphMatrix(bool iIsGraphMatrix) = 0;
713  virtual void EnableVIDocument(bool iIsVIDocument) = 0;
718  virtual void SetTemplateNodeKey(const std::string& irKey) = 0;
719 
720  //---------- APIs for animation.
726  virtual void SetGridGraphViewer(void* ipGridGraphViewer) = 0;
727 
731  virtual void EnableAnimation(bool iUseAnimation) = 0;
732 
736  virtual void ResetAnimationState() = 0;
737 
741  virtual void SetAnimationDuration(double iSeconds) = 0;
742 
746  virtual void HideAxisElements(bool iHide) = 0;
747 
748  //---------- APIs for uniform axis.
756  virtual void EnableUniformAxis(GraphMatrixMinMaxInfo yMinMaxInfo,
757  GraphMatrixMinMaxInfo xMinMaxInfo,
758  GraphMatrixMinMaxInfo zMinMaxInfo, Int32 iGraphHeight,
759  GraphMatrixMinMaxInfo y2MinMaxInfo = std::make_pair(-1, std::make_pair(0.0, 0.0)),
760  GraphMatrixMinMaxInfo x2MinMaxInfo = std::make_pair(-1, std::make_pair(0.0, 0.0)) ) = 0;
770  virtual Int32 GetUniformYAxisWidth(Int32 iYAxisLength, Int32 iMetricIndex = -1, bool iIsForSecondaryAxis = false) = 0;
781  virtual Int32 GetUniformXAxisHeight(Int32 iXAxisLength, Int32 iMetricIndex = -1, bool iIsForSecondaryAxis = false) = 0;
782 
791 #ifndef _VE_CE
792  virtual void DrawUniformYAxis(CGContext* ipCGContext, Int32 iWidth, Int32 iHeight, bool iIsForSecondaryAxis = false) = 0;
793 #else
794  virtual void DrawUniformYAxis(Int32 iWidth, Int32 iHeight, bool iIsForSecondaryAxis = false) = 0;
795 #endif
796 
804 #ifndef _VE_CE
805  virtual void DrawUniformXAxis(CGContext* ipCGContext, Int32 iWidth, Int32 iHeight, bool iIsForSecondaryAxis = false) = 0;
806 #else
807  virtual void DrawUniformXAxis(Int32 iWidth, Int32 iHeight, bool iIsForSecondaryAxis = false) = 0;
808 #endif
809 
817 #ifndef _VE_CE
818  virtual void DrawDataAreaForUniformAxis(CGContext* ipCGContext, Int32 iWidth, Int32 iHeight) = 0;
819 #else
820  virtual void DrawDataAreaForUniformAxis(Int32 iWidth, Int32 iHeight) = 0;
821 #endif
822 
829  virtual void GetUniformAxisMargins(short& orLeftMargin, short& orRightMargin, short& orTopMargin, short& orBottomMargin, bool iIsForSecondaryAxis = false) = 0;
834  virtual void SetUniformAxisMargins(short iLeftMargin, short iRightMargin, short iTopMargin, short iBottomMargin, bool iIsForSecondaryAxis = false) = 0;
835 
839  //virtual void GetUniformAxisLabelInfoMap(AxisLabelInfoMap* ipInfoMap, bool iIsXAxis) = 0;
840 
841 
848  virtual bool GetRowAndColumnIndexByCoords(int iX, int iY, int& orRowIndex, int& orColumnIndex, bool iIsDataCellOnly, int iDistance=-1) = 0;
849 
856  virtual bool IsDrillableLabelAtCoords(int iX, int iY, std::string& orLinkURL) = 0;
857 
858 
860  virtual void SetFormatManager(FormatManager::Ptr iFormatManagerPtr) = 0;
861 
867  virtual void GetHighlightObjects(std::vector<std::pair<Int32, Int32> >& orHighlightObjects) const = 0;
868  virtual void GetHighlightObjects(std::vector<MsiChart::TripleId>& orHighlightObjects) const = 0;
869 
871  virtual void HighlightSelectedObject(bool iHighlight, bool iIsForLassoSelction = false) = 0;
872 
874  virtual void GetSOByLassoSelection(std::vector<std::pair<int,int> >& iObjects) = 0;
875 
877  virtual void HighlightSelectedInInit(std::vector<std::pair<Int32, Int32> >& iSelectedSeriesAndColumns) = 0;
878 
880  virtual void EnterGrayoutMode() = 0;
881 
883  virtual void ExitGrayoutMode() = 0;
884 
886  virtual bool IsGrayoutMode() const = 0;
887 
888  virtual void EnterDuplicateMode() = 0;
889  virtual void ExitDuplicateMode() = 0;
890  virtual bool IsDuplicateMode() const = 0;
891 
895  virtual void RefreshGraphMatrixContext() = 0;
896 
900  virtual void SetGMCEContext(void* iGMCEContext) = 0;
901 
904  virtual void RefreshOnDataChange() = 0;
905 
909  virtual Int32 GetSeriesColorFromPalette(Int32 iIndex) = 0;
910 
912  virtual bool IsDataEnough() = 0;
913 
915  virtual float GetMemoryUsageEstimation() = 0;
916 
917  virtual void SetFontScale(double iRatio = 1.0) = 0;
918 
919  // 470358 Set DSSRWTemplateNode to resolve macros such as {&ReportName} in tooltip.
920  virtual void SetTemplateNode(DSSRWTemplateNode* ipTemplateNode) = 0;
921 
929  virtual double GetPositionAtTick(double iTickValue, bool iIsForXAxis, Int32 iGraphDimentionLength) = 0;
930 
935  virtual void SetEntireness(bool iIsEntireChart) = 0;
936 
942  virtual Int32 GetIntervalSpace(bool iIsXAxis) = 0;
943 
949  virtual bool IsZeroBaseLineQualified(bool iIsXAxis, bool isSecondaryAxis) = 0;
950 
957  virtual Int32 LayoutAxis(bool iIsXAxis, bool iIsRotated, Int32& orMaxLabelSpace) = 0;
958 
963  virtual Int32 GetAxisLabelRotaion(bool iIsXAxis) = 0;
964 
965  virtual Int32 GetMaxElementRadius(Int32 iWidth, Int32 iHeight, bool iIsPerfectPadding = false) = 0;
966 
967  virtual Int32 GetCachedMaxElementSize() = 0;
968 
970  //judge whether should rotate data label in vertical bar chart. used in GMCEController
971  virtual bool ShouldRotateDataLabel(Int32 iWidth, Int32 iHeight, bool iIsForPefectPadding = false) = 0;
972 
973  //judge whether should adjust value axis, used in GMCEDataManager
974  virtual bool ShouldAdjustValueAxis(Int32 iWidth, Int32 iHeight, double &irAdjustedValue, bool iIsForPefectPadding = false) = 0;
975 
980  virtual bool IsIsolatedDot(const TripleId& irId) = 0;
981 
984  virtual bool IsIsolatedDotInLine(const TripleId& irId) = 0;
985 
991  virtual bool GetInterlacedBandingPosition(bool iIsXAxis, std::vector<double>& orPostions, bool iIsFromUniformAxis = true) = 0;
992 
1000  virtual bool GetGroupSpace(std::vector<Int32>& orVect, Int32 iGroupIndex, bool iIsLegned = false) = 0;
1001  virtual bool GetSpaceAt(std::vector<Int32>& orVect, const TripleId& irObjectId) = 0;
1002 
1007  virtual void DisableAnimationForZoom(bool iDisableAnimation) = 0;
1008 
1014  virtual bool RefreshChart(const RefreshPack& irRefreshPack) = 0;
1015 
1021  virtual bool GetDataAreaPadding(std::vector<double>& orPaddings) = 0;
1022 
1027  virtual bool IsVerticalChart() const = 0;
1028  virtual void SetTextAsShape(bool iFlag) = 0;
1029  virtual void cleanDataSet() = 0;
1030  };
1031 
1033 
1034 #ifdef _VE_CE
1035  CHARTENGINE_API FormatManager::Ptr CreateFormatManager(ICDSSRWIterator* ipIterator, ICDSSGridFormatter* ipGridFormatter);
1036 #endif
1037 
1044  CHARTENGINE_API Chart* CreateChart(Dataset::Ptr iDatasetPtr, const char* ipGDFFileName = NULL);
1045 
1055  //CHARTENGINE_API Chart* CreateChartFromTemplate(IDSSTemplate* ipTemplate, Int32 iBeginRow, Int32 iEndRow, Int32 iBeginCol, Int32 iEndCol);
1056 
1064  CHARTENGINE_API Chart* CreateChartFromRawDataAndGDF(const char* ipDataFileName, const char* ipGDFFileName, GenericInputType iType = PLAIN_LABEL_SEPERATION_FORMAT);
1065 
1066 
1067  CHARTENGINE_API Chart* CreateChartFromFormatManager(Dataset::Ptr iDatasetPtr, FormatManager::Ptr iFormatManagerPtr, const char* ipGDFFileName = NULL, bool iForceGraph = false);
1068 
1069 #ifdef _VE_CE
1070  CHARTENGINE_API JSONCanvas::Ptr CreateJSONCanvas();
1071  CHARTENGINE_API CECanvas::Ptr CreateCECanvas();
1072 #endif
1073 }
1074 
1075 #endif
virtual bool GetPieSliceTooltipDataString(Int32 iSeriesID, Int32 iGroupID, Int32 iAngleID, Int32 iSliceID, Int32 iColumnOffset, MBase::String &orDataString)=0
virtual Int32 GetDataAreaSplitX() const =0
virtual void GetGroupLabel(Int32 iGroupId, MBase::String &orGroupLabel, const wchar_t iSeparator, bool iIsAbbreviated)=0
Definition: Chart.h:43
virtual bool SetOptions(Int32 iObjectId, Int32 iSeriesId, Int32 iGroupId, Int32 iPropertyId, CComVariant *ipValue)=0
std::vector< std::string > mCategoryNames
Definition: Chart.h:116
Definition: DSSRWTemplateNode.h:19
virtual bool IsVerticalChart() const =0
virtual void HighlightOrHideObjects(const std::vector< TripleId > &irTripleIds, bool iIsHide)=0
CHARTENGINE_API Chart * CreateChart(Dataset::Ptr iDatasetPtr, const char *ipGDFFileName=NULL)
std::string mDataString
Definition: Chart.h:109
virtual void OnZoomRestore()=0
virtual double GetGroupIntervalInPixel()=0
virtual bool GetOptions(Int32 iObjectId, Int32 iSeriesId, Int32 iGroupId, Int32 iPropertyId, CComVariant *opValue)=0
virtual bool RefreshChart(const RefreshPack &irRefreshPack)=0
virtual void GetSeriesLabel(Int32 iSeriesID, MBase::String &orSeriesLabel, bool iSubstitute=true, Int32 iColumnOffset=0, bool iIsForSlice=true)=0
virtual bool IsInitialized() const =0
SelectedInfo(TripleId iId, Int32 iShape, bool iIsIsolatedDot)
Definition: Chart.h:133
virtual void SetGMZoomScale(float iHeightScale, float iWidthScale)=0
virtual bool GetInterlacedBandingPosition(bool iIsXAxis, std::vector< double > &orPostions, bool iIsFromUniformAxis=true)=0
virtual Int32 GetUniformXAxisHeight(Int32 iXAxisLength, Int32 iMetricIndex=-1, bool iIsForSecondaryAxis=false)=0
Int32 mShapeType
Definition: Chart.h:146
virtual void SetEntireness(bool iIsEntireChart)=0
virtual bool ShouldAdjustValueAxis(Int32 iWidth, Int32 iHeight, double &irAdjustedValue, bool iIsForPefectPadding=false)=0
virtual void GetStaggerLabelEndLevel(Int32 &orLabelEndLevel)=0
virtual void OnSwipingInZoom(Int32 iX, Int32 iY)=0
virtual Int32 GetDataGroup(bool &orIgnoreForNoSeriesOrGroup) const =0
virtual void OnZooming(Int32 iOldStart, Int32 iOldEnd, Int32 iNewStart, Int32 iNewEnd, bool iIsVertical)=0
virtual void HighlightOrHideOneObject(const TripleId irTripleId, bool iIsHide)=0
virtual void EnterDuplicateMode()=0
virtual void ExitGrayoutMode()=0
Exit gray out mode.
virtual int GetNumOfSelectedObjects()=0
Hierachical one, we will use it to populate row/column tree in dataset LATER.
Definition: Chart.h:32
virtual Dataset::Ptr GetData()=0
virtual void SetStaggerLabelStartLevel(Int32 irLabelStartLevel)=0
virtual void SetFontScale(double iRatio=1.0)=0
virtual Int32 GetUniformYAxisWidth(Int32 iYAxisLength, Int32 iMetricIndex=-1, bool iIsForSecondaryAxis=false)=0
virtual bool GetRowAndColumnIndexByCoords(int iX, int iY, int &orRowIndex, int &orColumnIndex, bool iIsDataCellOnly, int iDistance=-1)=0
Int32 mGroupId
Definition: Chart.h:106
virtual Tooltip * CreateToolTipBySeriesAndGroup(Int32 iSeriesID, Int32 iGroupID, bool iPersistent=false)=0
std::map< Int32, std::pair< double, double > > mValueAxisScaleSet
Definition: Chart.h:38
virtual bool AddToSelectionList(const TripleId &iObject)=0
virtual void GetAllGraphObjectInfo(std::vector< CGRect > &iAllGraphObjectsBorder, std::vector< MsiChart::TripleId > &iAllGraphObjectsTripleId)=0
bool mIsReferenceLine
Definition: Chart.h:126
virtual bool IsZeroBaseLineQualified(bool iIsXAxis, bool isSecondaryAxis)=0
virtual void Delete()=0
virtual void GetSOByLassoSelection(std::vector< std::pair< int, int > > &iObjects)=0
Get Selected Objects by Lasso Selections.
virtual bool RemoveFromSelectionList(const TripleId &iObject)=0
virtual bool GetDataAreaPadding(std::vector< double > &orPaddings)=0
virtual void HideAxisElements(bool iHide)=0
virtual void EnableTimeSeriesChart(bool iIsTimeSeriesChart)=0
virtual void EnterGrayoutMode()=0
Enter gray out mode.
#define CHARTENGINE_API
Definition: Dataset.h:22
virtual bool GetPositionById(Int32 iSeriesId, Int32 iGroupId, Int32 &orX, Int32 &orY)=0
virtual void ResetAnimationState()=0
virtual Int32 CreateTooltipByObject(TripleId *ipSelectionList, Int32 iNum, std::vector< Tooltip *> &orTooltips, bool iPersistent=false)=0
CHARTENGINE_API FormatManager::Ptr CreateFormatManager(DSSRWGridIterator *ipIterator)
virtual void EnableAnimation(bool iUseAnimation)=0
virtual bool IsDrillableLabelAtCoords(int iX, int iY, std::string &orLinkURL)=0
std::vector< Int32 > mPolygonInfo
Definition: Chart.h:125
Tooltip()
Definition: Chart.h:83
virtual void SetCategoryAxisLabelInterval(Int32 irLabelInterval)=0
Int32 mNumOfValues
Definition: Chart.h:102
old style supported by CE
Definition: Chart.h:30
virtual bool CanShowTooltipById(TripleId &irId) const =0
virtual void EnableUniformAxis(GraphMatrixMinMaxInfo yMinMaxInfo, GraphMatrixMinMaxInfo xMinMaxInfo, GraphMatrixMinMaxInfo zMinMaxInfo, Int32 iGraphHeight, GraphMatrixMinMaxInfo y2MinMaxInfo=std::make_pair(-1, std::make_pair(0.0, 0.0)), GraphMatrixMinMaxInfo x2MinMaxInfo=std::make_pair(-1, std::make_pair(0.0, 0.0)))=0
TripleId mSelectedId
Definition: Chart.h:145
std::string mPercentValueString
Definition: Chart.h:122
GenericInputType
Definition: Chart.h:28
virtual Int32 GetLastGroupId()=0
virtual Int32 GetCategoryAxisLabelInterval()=0
Definition: Dataset.h:198
virtual void HighlightSelectedInInit(std::vector< std::pair< Int32, Int32 > > &iSelectedSeriesAndColumns)=0
Highlight selected object when the graph document is opened.
virtual void DeviceToVirtualPoint(Int32 &iorX, Int32 &iorY) const =0
std::string mPieSlicePercentContribution
Definition: Chart.h:123
virtual void SetTemplateNodeKey(const std::string &irKey)=0
virtual Int32 GetSeriesColorFromPalette(Int32 iIndex)=0
virtual void DisableAnimationForZoom(bool iDisableAnimation)=0
virtual Int32 GetAxisLabelRotaion(bool iIsXAxis)=0
std::string mRefrenceLineValue
Definition: Chart.h:127
virtual bool IsIsolatedDotInLine(const TripleId &irId)=0
virtual bool GetHoveredLineObject(TripleId &orHoveredLineObject, Int32 iIndex=0)=0
virtual void HighlightSelectedObject(bool iHighlight, bool iIsForLassoSelction=false)=0
Highlight selected object.
virtual Int32 GetDataAreaSplitY() const =0
virtual unsigned Int32 GetToolTipByCoords(Int32 iX, Int32 iY, std::vector< Tooltip *> &orTooltips, bool iPersistent=false)=0
Definition: Chart.h:131
virtual bool GetToolTipDataString(Int32 iSeriesID, Int32 iGroupID, MBase::String &orDataString, Int32 iOffset=0)=0
Int32 mSeriesId
Definition: Chart.h:105
std::string mExDataString2
Definition: Chart.h:113
Int32 mDataPointY
Definition: Chart.h:101
virtual bool GetToolTipData(Int32 iSeriesID, Int32 iGroupID, double &orValue, double &orPercentValue, Int32 iOffset=0)=0
virtual bool OnRectangleSelection(Int32 iLeft, Int32 iTop, Int32 iWidth, Int32 iHeight, bool iSmartSelection, TripleId *&orpSelectionList, Int32 &oNum)=0
std::string mConcatenatedString
Definition: Chart.h:114
virtual void SetXAxisLogicalRange(double iXLogicalStart, double iXLogicalEnd)=0
CHARTENGINE_API Chart * CreateChartFromRawDataAndGDF(const char *ipDataFileName, const char *ipGDFFileName, GenericInputType iType=PLAIN_LABEL_SEPERATION_FORMAT)
virtual Int32 GetIntervalSpace(bool iIsXAxis)=0
virtual Int32 GetGraphHeight() const =0
#define Int32
Definition: BasicTypes.h:20
std::pair< int, std::pair< double, double > > GraphMatrixMinMaxInfo
Definition: Chart.h:48
virtual void RefreshGraphMatrixContext()=0
virtual bool GetGroupSpace(std::vector< Int32 > &orVect, Int32 iGroupIndex, bool iIsLegned=false)=0
virtual double GetPositionAtTick(double iTickValue, bool iIsForXAxis, Int32 iGraphDimentionLength)=0
EnumGraphTooltipStyle
Definition: Chart.h:41
virtual void SetCurrentGraphFrame(Int32 iX, Int32 iY, Int32 iWidth, Int32 iHeight)=0
virtual void SetChartComponent(Int32 iChartComponent)=0
virtual void SetUniformAxisMargins(short iLeftMargin, short iRightMargin, short iTopMargin, short iBottomMargin, bool iIsForSecondaryAxis=false)=0
virtual void ExitDuplicateMode()=0
void Serieslise(std::vector< int > &orVect)
Definition: Chart.h:92
virtual void GetAxisNumberFormat(CComVariant *opValue) const =0
void ToDataProvider(GraphTooltipDataProvider &orDataProvider, Int32 iStyleIndex)
virtual void ClearSelectionList()=0
virtual bool GetPrimaryDataString(Int32 iSeriesID, Int32 iGroupID, MBase::String &orDataString, bool iIsForColor, Int32 iSizebyIndex=0)=0
std::vector< std::string > mMetricsValues
Definition: Chart.h:119
virtual bool GetNearestObject(Int32 iX, Int32 iY, const std::vector< Int32 > &irObjectIds, Int32 iRadius, TripleId &orNearestTripleId, int *opNearestDistance=NULL)=0
virtual void GetHighlightObjects(std::vector< std::pair< Int32, Int32 > > &orHighlightObjects) const =0
virtual Int32 GetMaxElementRadius(Int32 iWidth, Int32 iHeight, bool iIsPerfectPadding=false)=0
virtual Int32 GetGraphWidth() const =0
virtual void SetGMCEContext(void *iGMCEContext)=0
virtual bool ShouldRotateDataLabel(Int32 iWidth, Int32 iHeight, bool iIsForPefectPadding=false)=0
CHARTENGINE_API Chart * CreateChartFromFormatManager(Dataset::Ptr iDatasetPtr, FormatManager::Ptr iFormatManagerPtr, const char *ipGDFFileName=NULL, bool iForceGraph=false)
virtual void SetGraphType(short iGraphType)=0
virtual int ApplySelectedObjects(Int32 iX, Int32 iY, std::vector< Point2D > &iPoints, Point2D &ioPoint)=0
virtual void DrawDataAreaForUniformAxis(CGContext *ipCGContext, Int32 iWidth, Int32 iHeight)=0
virtual void DrawUniformYAxis(CGContext *ipCGContext, Int32 iWidth, Int32 iHeight, bool iIsForSecondaryAxis=false)=0
virtual void GetGraphType(short &orGraphType)=0
virtual bool SaveImageToFile(Int32 iWidth, Int32 iHeight, Int32 iFormat, const char *ipFilename)=0
General image usage.
Definition: Common.h:325
virtual bool ClearOneHighlightObject(MsiChart::TripleId iTripleId)=0
MBase::StrongPtr< Chart, MBase::DeleteOperatorGeneric< Chart > > ChartPtr
Definition: Chart.h:1032
virtual bool IsGrayoutMode() const =0
is gray out mode
virtual void DrawUniformXAxis(CGContext *ipCGContext, Int32 iWidth, Int32 iHeight, bool iIsForSecondaryAxis=false)=0
Definition: StrongPtr.h:50
std::basic_string< WCHAR, std::char_traits< WCHAR >, Allocator< WCHAR > > String
Definition: BaseString.h:26
Tooltip(Int32 iDataPointX, Int32 iDataPointY, Int32 iNumOfValues, Int32 iSeriesId, Int32 iGroupId, int iSeriesColor, const char *ipDataString, const char *ipCategoryName, const char *ipSeriesName, const char *ipExDataString1, const char *ipExDataString2, const char *ipConcatenatedString)
Definition: Chart.h:52
virtual bool OnPointDetection(Int32 iX, Int32 iY, bool iSmartSelection, TripleId &orSelectedObject)=0
AE style.
Definition: Chart.h:31
Definition: Chart.h:157
virtual void SetShowNumbericTicks(std::set< double > &irTicksSet, bool iIsForXAxis)=0
std::vector< Int32 > mRectInfo
Definition: Chart.h:124
virtual Int32 GetChartAreaId(const TripleId &iObject)=0
virtual int GetDataPointForUIMenu(Int32 iX, Int32 iY, Tooltip &ioTooltip, bool iLSMode=false)=0
Definition: ABLPlot.h:21
SelectedInfo()
Definition: Chart.h:141
std::string mSeriesName
Definition: Chart.h:111
virtual bool IsInSelectionList(const TripleId &iObject)=0
std::vector< AreaRec * > ImageMap
Definition: ImageMap.h:99
virtual void RefreshOnDataChange()=0
virtual bool IsDataEnough()=0
Check whether the data is enough for selected graph type.
virtual bool OnHover(Int32 iX, Int32 iY)=0
virtual void SetTextAsShape(bool iFlag)=0
virtual void cleanDataSet()=0
virtual float GetMemoryUsageEstimation()=0
Get memory usage estimation before drawing.
virtual void DisposeSelectionList(TripleId *ipSelectionList)=0
std::string mAxisLabelString
Definition: Chart.h:120
std::vector< std::vector< std::string > > mColLabels
Definition: Chart.h:118
virtual void SetGridGraphViewer(void *ipGridGraphViewer)=0
virtual void SetTimeSeriesIntegrity(Int32 iIntegrity)=0
virtual void EnableMicroChart(bool iIsMicroChart)=0
virtual void SetData(Dataset::Ptr iDatasetPtr)=0
virtual bool GetAllObjectsWithInDistance(Int32 iX, Int32 iY, const std::vector< Int32 > &irObjectIds, Int32 iRadius, std::vector< SelectedInfo > &orNearObjects, std::vector< Int32 > &orDistance)=0
std::string mCategoryName
Definition: Chart.h:110
virtual bool SaveImageToMemory(Int32 iWidth, Int32 iHeight, Int32 iFormat, char *&oprMemory, unsigned Int32 &oSize)=0
Int32 mSliceIndex
Definition: Chart.h:104
Dataset::Ptr mDatasetPtr
Definition: Chart.h:37
virtual bool GetNearestObjectForGMCombo(Int32 iX, Int32 iY, const std::vector< Int32 > &irObjectIds, Int32 iRadius, TripleId &orNearestTripleId, int *opNearestDistance)=0
virtual void GetShownNumericTicks(std::set< double > &orTicksSet, bool iIsForXAxis)=0
virtual bool GetPrimaryDataStringForPie(Int32 iSeriesId, Int32 iGroupID, MBase::String &orDataString, bool iIsForColor, Int32 iColumnOffset=0, bool isPercentValue=false, Int32 iAngleIndex=-3, Int32 iSlcieIndex=-3)=0
virtual void SetTemplateNode(DSSRWTemplateNode *ipTemplateNode)=0
virtual void OnSwipingOutOfZoom(Int32 iOffset)=0
virtual void SetIsCategoryXAxisForPartialRendering(bool isForPartialRendering)=0
Definition: Chart.h:50
Definition: Msi_ccomvariant.h:24
virtual bool SaveImageToCGContext(CGContext *ipCGContext, Int32 iWidth, Int32 iHeight, bool iShowValueAxis=true, Int32 iImageUsage=IU_GENERAL)=0
virtual void SetDataAreaSplitX(Int32 iXCoord)=0
Definition: ChartCanvas.h:39
virtual void AllocSelectionList(TripleId *&orpSelectionList, Int32 &oNum)=0
virtual bool GetHoveredObject(TripleId &orHoveredObject, Int32 iIndex=0)=0
virtual Int32 LayoutAxis(bool iIsXAxis, bool iIsRotated, Int32 &orMaxLabelSpace)=0
virtual void OnZoomingByGroupRange(double iStartGroup, double iEndGroup)=0
virtual bool GetSpaceAt(std::vector< Int32 > &orVect, const TripleId &irObjectId)=0
Int32 mDataPointX
Definition: Chart.h:100
virtual bool IsDuplicateMode() const =0
virtual void SetChartOffset(Int32 iXOffset, Int32 iYOffset)=0
std::string mSizeByDataString
Definition: Chart.h:121
virtual void SetAnimationDuration(double iSeconds)=0
virtual bool IsIsolatedDot(const TripleId &irId)=0
int mSeriesColor
Definition: Chart.h:108
virtual Int32 GetCachedMaxElementSize()=0
Definition: ChartContext.h:313
#define NULL
Definition: Null.h:10
std::vector< std::pair< std::string, std::string > > GraphTooltipDataProvider
Definition: Chart.h:47
virtual void VirtualToDevicePoint(Int32 &iorX, Int32 &iorY) const =0
virtual void EnableGraphMatrix(bool iIsGraphMatrix)=0
std::vector< std::string > mRowLabels
Definition: Chart.h:117
virtual void EnableVoiceOver(bool iIsVoiceOverMode)=0
Definition: Chart.h:35
virtual void SetFormatManager(FormatManager::Ptr iFormatManagerPtr)=0
Set a new FormatManager to current chart.
virtual void EnableVIDocument(bool iIsVIDocument)=0
std::string mExDataString1
Definition: Chart.h:112
virtual void GetUniformAxisMargins(short &orLeftMargin, short &orRightMargin, short &orTopMargin, short &orBottomMargin, bool iIsForSecondaryAxis=false)=0
Definition: Chart.h:44
virtual bool PlainDraw(Int32 iWidth, Int32 iHeight)=0
Int32 mObjectId
Definition: Chart.h:107
virtual void SetCGContext(CGContext *ipCGContext)=0
virtual bool GenerateImageMap(Int32 iWidth, Int32 iHeight, ImageMap &oImageMap)=0
Int32 mAngleIndex
Definition: Chart.h:103
bool mIsIsolatedDot
Definition: Chart.h:147
virtual void SetAdvancedChartTypeSupport(bool iAdvancedChartTypeSupport)=0
Definition: Common.h:397
virtual void ResetGroupRangeAndAxesState(Int32 iBeginGroup, Int32 iEndGroup)=0
Definition: FormatManager.h:157