Mobile API Reference
MicroStrategy 2019
|
#include <Axis.h>
Public Types | |
typedef MSynch::SmartPtr< Axis > | Ptr |
Public Types inherited from MsiChart::GraphObjectManager | |
typedef MSynch::SmartPtr< GraphObjectManager > | Ptr |
Public Member Functions | |
Axis (const TripleId &irTripleId, GraphObjectManager *ipManager, unsigned char iAxisLabelsLocation, unsigned char iAxisDirection) | |
virtual | ~Axis () |
void | SetDeviceDataArea (const Rect2D &irDeviceDataArea) |
void | GetDeviceDataArea (Rect2D &orDeviceDataArea) |
virtual void | GetOptions (Int32 iSeriesId, Int32 iPropertyId, CComVariant *opValue) const |
virtual GraphObject::Ptr | OnPointDetection (const Point2D &irCursor) const |
bool | IsReverseOrder () |
void | SetDepthAndDirection (Int32 iDepth, Int32 iDepthDirection) |
void | GenerateAxisLine (std::vector< GraphObject::Ptr > &iorGraphObjectList) |
void | GenerateGridLines (const Rect2D &irDataArea, Int32 iAreaId, std::vector< GraphObject::Ptr > &iorGraphObjectList) |
void | GenerateGridLines () |
void | GenerateInterlacedGrids (const Rect2D &irDataArea, Int32 iAreaId, std::vector< GraphObject::Ptr > &iorGraphObjectList) |
virtual void | GetInterlacedPositions (std::vector< double > &orPositions) |
virtual double | GetLogicalCoord (Int32 iAbsoluteCoord)=0 |
virtual float | GetAbsoluteCoord (double iLogicalCoord)=0 |
virtual void | GetMinMaxLogicalCoord (double &orMin, double &orMax) const =0 |
virtual double | GetSlopeFactor (double iLogicalCoord) const =0 |
virtual bool | IsLogarithmic () const |
virtual double | GetPositionAtTick (double iTickValue)=0 |
bool | IsMajorGridShown () const |
bool | IsInterlacedShown () const |
bool | IsLabelsShown () const |
bool | IsTitleShown () const |
void | ReserveTitleArea (Rect2D &iorTitleArea) |
void | SetAxisInfoFor3D (Int32 iAxisLength, Int32 iAxisMargin) |
Int32 | GetAxisLengthFor3D () const |
double | ValueToPositionFor3D (double iLogicalCoord) const |
virtual void | GenerateLabelsFor3D (const std::vector< Point2D > &irGridPoints, const DVector2D &irUnitOffsetDirection, GraphCollectionObject *ipLabelCollectioin, std::vector< GraphObject::Ptr > &iorGraphObjectList)=0 |
void | GenerateTitleFor3D (Int32 iObjectId, Point2D &irRefPoint, const DVector2D &irUnitOffsetDirection, std::vector< GraphObject::Ptr > &iorGraphObjectList) |
virtual void | GetGridLinePositionsFor3D (std::vector< double > &orGridLinePositions, EnumGraphObjectType iGraphObjectType) const =0 |
virtual void | TrimAxisPadding (Rect2D &iorRect, bool iUseFixedMargin=true) |
Int32 | GetAxisTitleLocationId (Int32 iAxisTitleId) const |
Int32 | GetInterlacedGridId () const |
void | InitObjectSet (const TripleId &irTripleId, EnumGraphObjectType iGraphObjectType) |
GraphCollectionObject * | GetObjectSet (EnumGraphObjectType iGraphObjectType) const |
virtual void | OnZooming (Int32 iOldStart, Int32 iOldEnd, Int32 iNewStart, Int32 iNewEnd)=0 |
void | DrawTitleAndLabels () |
void | SetIsAxisForRangeLegend (bool iIsForRangeLegend) |
double | GetIntervalSpace () |
virtual Int32 | LayoutAxis (bool iIsRotated, Int32 &orMaxLabelSpace)=0 |
Int32 | GetLabelRotation () |
virtual Int32 | GetUniformAxisExtraPadding () |
bool | IsUniformAxis () const |
void | SetAsUniformAxis (bool iUniformAxis) |
Public Member Functions inherited from MsiChart::GraphObjectManager | |
GraphObjectManager (const TripleId &irTripleId, GraphObjectManager *ipManager) | |
virtual | ~GraphObjectManager () |
void | GetTripleId (TripleId &orTripleId) const |
virtual GraphObject::Ptr | OnPointDetectionEx (const Point2D &irCursor, const std::vector< Int32 > &irObjectIds, Int32 &iorDistance, Int32 iRadius, std::vector< GraphObject::Ptr > &iorGraphObjectsAround, EnumGraphObjectUsage iUsage=GOU_NORMAL_HIGHLIGHT) |
virtual void | OnPointInPolygon (const Point2D &irCursor, const std::vector< Int32 > &irObjectIds, const std::vector< Point2D > &iPoints, std::vector< GraphObject::Ptr > &iorGraphObjectsIn) const |
virtual void | OnRectangleSelection (const Rect2D &irRect, std::vector< GraphObject::Ptr > &iorSelectedObjects) const |
virtual void | Draw () |
virtual void | GenerateView () |
virtual void | GenerateImageMap (ImageMap &iorImageMap) |
virtual void | GenerateMapAndList ()=0 |
virtual GraphObject::Ptr | GetGraphObject (const TripleId &irTripleId, bool iRecursive=true) const |
GraphObjectManager::Ptr | GetGraphObjectManager (const TripleId &irTripleId, bool iRecursive=true) const |
void | GetAllGraphObjectInfo (std::vector< CGRect > &iAllGraphObjectsBorder, std::vector< MsiChart::TripleId > &iAllGraphObjectsTripleId) |
virtual void | GenerateVirtualMarker () |
ChartContext::Ptr | GetChartContext () const |
Int32 | GetChartAreaId () const |
void | AddToMapAndList (GraphObject::Ptr iGraphObjectPtr) |
void | AddToMapAndList (std::vector< GraphObject::Ptr > iGraphObjectPtrList) |
void | AddToList (GraphObject::Ptr iGraphObjectPtr) |
void | AddToManagerList (GraphObjectManager::Ptr iGraphObjectPtr) |
void | AddToMap (GraphObject::Ptr iGraphObjectPtr) |
void | InsertGraphObjectListAfterObject (const std::vector< GraphObject::Ptr > &irGraphObjectList, const GraphObject *ipGraphObject) |
virtual void | GenerateInterpolationFrame (double iProgress, LayerObject *ipLayerObject) |
void | MergeObjectList (GraphObjectManager *ipGraphObjectManager, bool iIsAppend) |
void | GetGraphObjectList (std::vector< GraphObject::Ptr > &orGraphObjectList) |
Get GraphObject list. More... | |
void | GetGraphObjectManagerList (std::vector< GraphObjectManager::Ptr > &orGraphObjectManagerList) |
Get GraphObjectManager list. More... | |
void | ClearGraphObjectList () |
Clear GraphObject list. More... | |
float | GetMemoryUsageEstimation () const |
Get memory usage estimation for current GraphObjectManager. More... | |
void | ExtractGraphObjectsByObjectId (std::vector< GraphObject::Ptr > &orGraphObjectList, Int32 iObjectId) |
Extract some graph objects out by object ID. The extracted graph object will be removed from mGraphObjectList. More... | |
Protected Member Functions | |
virtual void | CreateAxisLine () |
Int32 | GetIndex () const |
void | ReserveTitle (Rect2D &iorTitleArea, bool iIsReversed) |
void | UpdateTitleLocation (const Rect2D &irTitleArea) |
void | ReserveDepthAxisLine (Rect2D &iorDeviceDataArea, bool iIsReversed=false, bool iBothDirections=false) const |
void | GetLabelOffset (Int32 iLabelLocation, Point2D &orOffset) const |
bool | HasLabelsOnBothSides () const |
bool | HasDepthAxisLine (Int32 iLabelLocation) const |
bool | IsVerticalAxis () const |
void | GetOneGridLine (Int32 iLocation, Int32 iGridStyle, Int32 iTickLength, const Point2D &irLeftOrBottom, const Point2D &irRightOrTop, std::vector< Point2D > &orPolyLine) |
void | GenerateOneLineObject (const TripleId &irTripleId, const std::vector< Point2D > &irPolyLine, GraphCollectionObject *ipGridLineSet) |
bool | IsRightDirection () const |
bool | IsLeftDirection () const |
bool | IsUpDirection () const |
bool | IsDownDirection () const |
bool | HasOuterTicks (Int32 iGridStyle) const |
bool | HasTwoGridLineParts (Int32 iGridStyle) const |
void | TrimMarginsForDepthAxis (Int32 &iorLowMargin, Int32 &iorHighMargin) const |
void | GetDepthMargin (Int32 &orLowMargin, Int32 &orHighMargin) const |
void | MoveLabel (TextObject *ipLabel, const Point2D &irGridPoint, const DVector2D &irUnitOffsetDirection, Int32 iLabelMargin=gLabelMargin) const |
void | MoveTitleForManual (TextObject *ipAxisTitle) const |
void | MoveGraphObjectList (std::vector< GraphObject::Ptr > &iorGraphObjectList) |
void | LoadProperties () |
Protected Member Functions inherited from MsiChart::GraphObjectManager | |
bool | ToBool (CComVariant *ipValue) const |
void | BoolToVariant (bool iValue, CComVariant *opValue) const |
void | AdjustObjectsForLayer () |
Additional Inherited Members | |
Static Public Member Functions inherited from MsiChart::GraphObjectManager | |
static GraphObject::Ptr | OnPointDetectionByList (const std::vector< GraphObject::Ptr > &irGraphObjectList, const Point2D &irCursor, const std::vector< Int32 > &irObjectIds, Int32 &iorDistance, Int32 iRadius, std::vector< GraphObject::Ptr > &iorGraphObjectsAround, EnumGraphObjectUsage iUsage=GOU_NORMAL_HIGHLIGHT) |
Protected Types inherited from MsiChart::GraphObjectManager | |
typedef std::pair< TripleId, GraphObject::Ptr > | MapPair |
Deals with some common options and operations of axis. Generally, there are following GraphObjects in the GraphObjectList or GraphObjectMap of Axis:
typedef MSynch::SmartPtr<Axis> MsiChart::Axis::Ptr |
MsiChart::Axis::Axis | ( | const TripleId & | irTripleId, |
GraphObjectManager * | ipManager, | ||
unsigned char | iAxisLabelsLocation, | ||
unsigned char | iAxisDirection | ||
) |
Constructor
irTriple | Identifies the object. |
ipManager | Pointer to the GraphObjectManager who created current object. |
iAxisLabelsLocation | Indicates where to show axis labels. Should be a value in EnumAxisLabelsLocation. |
iAxisDirection | Indicates the direction of current axis. Should be a value in EnumAxisDirection. |
|
virtual |
|
protectedvirtual |
Create axis line. This is a helper method of GenerateAxisLine().
Reimplemented in MsiChart::ValueAxis.
void MsiChart::Axis::DrawTitleAndLabels | ( | ) |
Only used by uniform axis in GraphMatrix. Draw axis title and axis labels.
void MsiChart::Axis::GenerateAxisLine | ( | std::vector< GraphObject::Ptr > & | iorGraphObjectList | ) |
Generate axis line
iorGraphObjectList | The axis line will be put into iorGraphObjectList. |
void MsiChart::Axis::GenerateGridLines | ( | const Rect2D & | irDataArea, |
Int32 | iAreaId, | ||
std::vector< GraphObject::Ptr > & | iorGraphObjectList | ||
) |
This method is supposed to be called by PlotManager. This method will generate Major and Minor grid lines.
irDataArea | Specify the data area of current chart area. |
AreaId | Specify the ID of current chart area. |
iorGraphObjectList | The grid lines will be put into iorGraphObjectList. |
void MsiChart::Axis::GenerateGridLines | ( | ) |
void MsiChart::Axis::GenerateInterlacedGrids | ( | const Rect2D & | irDataArea, |
Int32 | iAreaId, | ||
std::vector< GraphObject::Ptr > & | iorGraphObjectList | ||
) |
This method is supposed to be called by PlotManager. This method will generate interlaced grid interval.
irDataArea | Specify the data area of current chart area. |
AreaId | Specify the ID of current chart area. |
iorGraphObjectList | If depth is not used, the interlaced grids will be put into iorGraphObjectList. |
|
pure virtual |
Generate labels of current axis in 3D chart.
irGridPoints | Specifies the grid positions to indicate where the labels should be drawn. |
irUnitOffsetDirection | Specifies the direction of the labels relative to the grid positions. |
ipLabelCollection | Specifies the label collection object. |
iorGraphObjectList | The labels will be appended to this list. |
Implemented in MsiChart::ValueAxis, and MsiChart::CategoryAxis.
|
protected |
Generate one grid line and put it into grid line collection and mGraphObjectList.
irTriple | Specifies the TripleId of current grid line. |
irPolyLine | Specifies the grid line. |
ipGridLineSet | Points to a GraphCollectionObject which indicates the grid line collection. |
void MsiChart::Axis::GenerateTitleFor3D | ( | Int32 | iObjectId, |
Point2D & | irRefPoint, | ||
const DVector2D & | irUnitOffsetDirection, | ||
std::vector< GraphObject::Ptr > & | iorGraphObjectList | ||
) |
Generate title of current axis in 3D chart.
iObjectId | Specifies the Object ID for the axis title. |
irRefPoint | Specifies reference point to indicate where the labels should be drawn. |
irUnitOffsetDirection | Specifies the direction of the labels relative to irRefPoint. |
iorGraphObjectList | The title will be appended to this list. |
|
pure virtual |
return logical coordinate for trendline
iLogicalCoord | coordinate |
Implemented in MsiChart::ValueAxis, MsiChart::CategoryAxis, and MsiChart::PolarValueAxis.
|
inline |
Get axis length for 3D chart.
Get the object ID for the axis title of current axis in 3D chart.
iAxisTitleId |
Get depth margins generated by depth axis line.
iorLowMargin,iorHighMargin | Output the depth margins. |
|
inline |
Get device data area.
orDeviceDataArea | Output the rectangle of device data area |
|
pure virtual |
Get the grid line positions of current axis in 3D chart.
orGridLinePositions | Output the grid line positions. |
iGraphObjectType | Indicates which graph object (label, grid line or interlaced grid) are the grid positions used for. This is useful for category axis. |
Implemented in MsiChart::ValueAxis, and MsiChart::CategoryAxis.
|
protected |
Int32 MsiChart::Axis::GetInterlacedGridId | ( | ) | const |
Get the object ID of interlaced grids for current axis.
|
virtual |
Reimplemented in MsiChart::CategoryAxis.
double MsiChart::Axis::GetIntervalSpace | ( | ) |
Get the interval space, for category axis, the group size; for value axis the space between 2 ticks.
This is a helper method to update axis label location.
iLabelLocation | Should be a value in EnumAxisLabelsLocation. For convience, ALL_LEFT_RIGHT is treated as ALL_LEFT, and ALL_BOTTOM_TOP is treated as ALL_BOTTOM. |
orOffset | Output the offset of label location with consideration of depth. |
Int32 MsiChart::Axis::GetLabelRotation | ( | ) |
|
pure virtual |
return logical coordinate for trendline
iAbsoluteCoord | coordinate along the axis |
Implemented in MsiChart::ValueAxis, MsiChart::CategoryAxis, and MsiChart::PolarValueAxis.
|
pure virtual |
Get min tick and max tick of current axis in logical coordinate.
orMin | Min tick. |
orMax | Max tick. |
Implemented in MsiChart::ValueAxis, and MsiChart::CategoryAxis.
GraphCollectionObject* MsiChart::Axis::GetObjectSet | ( | EnumGraphObjectType | iGraphObjectType | ) | const |
Get one of the following GraphCollectionObject: GraphCollectionObject* mpMajorGridSet; GraphCollectionObject* mpMinorGridSet; GraphCollectionObject* mpInterlacedGridSet; GraphCollectionObject* mpAxisTitleSet; GraphCollectionObject* mpAxisLabelSet; GraphCollectionObject* mpAxisLineSet;
iGraphObjectType | Specifies a graph object type. |
|
protected |
Get one grid line.
iLocation | Should be a value in EnumAxisLabelsLocation. For convience, when HasTwoGridLineParts() is true, ALL_LEFT_RIGHT is treated as ALL_LEFT, and ALL_BOTTOM_TOP is treated as ALL_BOTTOM. |
iGridStyle | Specifies the style of current grid line. |
iTickLenth | Specifies the tick length when iGridStyle is DssGraphGridInnerTicks or DssGraphGridOuterTicks. |
irLeftOrBottom,irRightOrTop | Specifies the intersections of current grid line with axis lines assuming there is no depth. |
orPolyLine | Output the grid line. |
|
virtual |
This function gets the options related to current GraphObjectManager.
iSeriesId | Series ID. |
iPropertyId | Specifies the property ID to be set. |
opValue | A pointer to VARIANT which is used to store property value. |
Implements MsiChart::GraphObjectManager.
Reimplemented in MsiChart::CategoryAxis, and MsiChart::ValueAxis.
|
pure virtual |
Implemented in MsiChart::ValueAxis, and MsiChart::CategoryAxis.
|
pure virtual |
Get the slope factor (d(AbosluteVariable)/d(LogicalVariable)) at a speicified logical coordinate.
iLogicalCoord | Specified a logical coordinate. |
Implemented in MsiChart::ValueAxis, and MsiChart::CategoryAxis.
|
virtual |
Get the padding between the pass-out plotarea and the label text
Reimplemented in MsiChart::ValueAxis, and MsiChart::CategoryAxis.
|
protected |
Check whether a depth axis line needs to be drawn according to a given label location. Should be a value in EnumAxisLabelsLocation. For convience, ALL_LEFT_RIGHT is treated as ALL_LEFT, and ALL_BOTTOM_TOP is treated as ALL_BOTTOM.
|
inlineprotected |
Check whether the axis labels need to be shown on both sides or not.
|
inlineprotected |
Check whether a given style of grid lines has outer ticks. Specifies a style of grid lines.
|
inlineprotected |
Check whether a given style of grid lines will have two grid line parts when showing labels on both sides. Specifies a style of grid lines.
void MsiChart::Axis::InitObjectSet | ( | const TripleId & | irTripleId, |
EnumGraphObjectType | iGraphObjectType | ||
) |
Init one of the following GraphCollectionObject: GraphCollectionObject* mpMajorGridSet; GraphCollectionObject* mpMinorGridSet; GraphCollectionObject* mpInterlacedGridSet; GraphCollectionObject* mpAxisTitleSet; GraphCollectionObject* mpAxisLabelSet; GraphCollectionObject* mpAxisLineSet;
irTripleId | Specifies a TripleId for GraphCollectionObject. |
iGraphObjectType | Specifies a graph object type. |
|
inlineprotected |
Check whether current depth direction is downwards.
|
inline |
Check whether to show interlaced grids or not.
|
inline |
Check whether to show axis labels or not.
|
inlineprotected |
Check whether current depth direction is to the left.
|
inlinevirtual |
Check whether current ValueAxis use logarithmic scale or not.
Reimplemented in MsiChart::ValueAxis.
|
inline |
Check whether to show major grid lines or not.
|
inline |
Check whether the axis labels should be shown in reverse order.
|
inlineprotected |
Check whether current depth direction is to the right.
|
inline |
Check whether to show axis title or not.
|
inline |
Whether this axis is a uniform axis. Setter/Getter.
|
inlineprotected |
Check whether current depth direction is upwards.
|
inlineprotected |
Check whether current axis is vertical or not.
To layout the axis in "Fit to Content" mode.
Implemented in MsiChart::ValueAxis, and MsiChart::CategoryAxis.
|
protected |
Load related properties of Axis from ChartContext.
|
protected |
Move graph objects from mManagerGraphObjectList to iorGraphObjectList.
iorGraphObjectList | Manager's graphObject list. |
|
protected |
Move one axis label to an appropriate position.
ipLabel | Specifies a label. |
irGridPoint | Specifies a corresonding grid point for this label. |
irUnitOffsetDirection | This is a unit vector which indicates the offset direction from irGridPoint. |
iLabelMargin | Specifies the margin between the label and irGridPoint. |
|
protected |
Move title for manual layout.
ipAxisTitle | Specifies the axis title which needs to be moved. |
|
virtual |
Provided the cursor coordinate, this function returns the GraphObject which contains that coordinate. If there are more then one GraphObject contains this coordinate, the one on top layer will be returned.
irCursor | The coordinate of cursor. |
Reimplemented from MsiChart::GraphObjectManager.
|
pure virtual |
Handles zooming event.
iOldStart,iOldEnd | Specifies an old range. |
iNewStart,iNewEnd | Specifies a new range. |
Implemented in MsiChart::ValueAxis, and MsiChart::CategoryAxis.
|
protected |
This method is used to reserve depth axis line area. When depth is used, the data area need to be shrinked to hold the depth axis line.
iorDeviceDataArea | Indicates the reference rectangle for data area. |
iIsReversed | If this parameter is false, iorDeviceDataArea will be adjusted by substracting depth axis line area. Otherwise, it will be adjusted by adding depth axis line area. |
iBothDirection | Indicate whehter to reserve depth line at both directions. |
|
protected |
This method is used to reserve title area according to a reference rectangle.
iorTitleArea | Indicates the reference rectangle of axis title. |
iIsReversed | If this parameter is false, iorTitleArea will be adjusted by substracting title area. Otherwise, it will be adjusted by adding title area. |
void MsiChart::Axis::ReserveTitleArea | ( | Rect2D & | iorTitleArea | ) |
Generate title and reserve title area
iorTitleArea | This area will be adjusted by subtracting title area. |
|
inline |
Set axis information for 3D chart.
iAxisLength | Specifies the length of current axis. |
iAxisMargin | Specifies the margin of current axis. |
Set depth value and depth direction. If this method is called, mUseDepth with be set to true.
iDepth | Depth value. |
iDepthDirection | Depth direction. |
|
inline |
This function sets the data area of current axis. Please make sure that this function is called before calling GenerateMapAndList(). This function sets the data area of current axis.
irDeviceDataArea | Reference to the data area of current axis. |
void MsiChart::Axis::SetIsAxisForRangeLegend | ( | bool | iIsForRangeLegend | ) |
Denote whether this axis is associated with a range legend
|
virtual |
Reimplemented in MsiChart::ValueAxis, and MsiChart::CategoryAxis.
|
protected |
This method trims the input margins for the space reserved by depth axis line. This method is useful for X and Category axis.
iorLowMargin,iorHighMargin | Specifies the margins which need to be trimed. |
|
protected |
Axis title is created in ReserveTitleArea(). But the data area may be changed later. The location of axis title need to be updated using this method.
irTitleArea | Indicates the reference rectangle of axis title. |
double MsiChart::Axis::ValueToPositionFor3D | ( | double | iLogicalCoord | ) | const |
Get 3D absolute coordinate from logical coordinate
iLogicalCoord | Specifies a logical coordinate. |
|
protected |
General axis properties.
|
protected |
|
protected |
|
protected |
Axis title string.
|
protected |
Indicate the depth value.
|
protected |
Indicate the depth direction.
|
protected |
Indicate the depth offset.
|
protected |
Indicate the data area of current axis.
|
protected |
When depth is not used, the grid lines need to be put into manager's graph object list.
|
protected |
|
protected |
Is this axis is used by a range legend.
|
protected |
|
protected |
|
protected |
Properties of major grid lines.
|
protected |
|
protected |
Properties of minor grid lines.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Tick Length.
|
protected |
Indicate whether to use depth or not.