Mobile API Reference  MicroStrategy 2019
MsiChart::Axis Class Referenceabstract

#include <Axis.h>

Inheritance diagram for MsiChart::Axis:
MsiChart::GraphObjectManager MsiChart::CategoryAxis MsiChart::ValueAxis MsiChart::GaugeValueAxis MsiChart::PolarValueAxis MsiChart::RadarCategoryAxis

Public Types

typedef MSynch::SmartPtr< AxisPtr
 
- Public Types inherited from MsiChart::GraphObjectManager
typedef MSynch::SmartPtr< GraphObjectManagerPtr
 

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)
 
GraphCollectionObjectGetObjectSet (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 ()
 

Protected Attributes

GraphAxisGeneral mAxisInfo
 General axis properties. More...
 
GraphAxisGrid mMajorGrid
 Properties of major grid lines. More...
 
GraphAxisGrid mMinorGrid
 Properties of minor grid lines. More...
 
Rect2D mDeviceDataArea
 Indicate the data area of current axis. More...
 
Int32 mTickLength
 Tick Length. More...
 
bool mUseDepth
 Indicate whether to use depth or not. More...
 
Int32 mDepth
 Indicate the depth value. More...
 
Int32 mDepthDirection
 Indicate the depth direction. More...
 
Point2D mDepthOffset
 Indicate the depth offset. More...
 
MBase::String mAxisTitle
 Axis title string. More...
 
double mLowTrim
 
double mHighTrim
 When depth is not used, the grid lines need to be put into manager's graph object list. More...
 
std::vector< GraphObject::PtrmManagerGraphObjectList
 
bool mIsAxisFor3D
 
Int32 mAxisLengthFor3D
 
Int32 mAxisMarginFor3D
 
GraphCollectionObjectmpMajorGridSet
 
GraphCollectionObjectmpMinorGridSet
 
GraphCollectionObjectmpInterlacedGridSet
 
GraphCollectionObjectmpAxisTitleSet
 
GraphCollectionObjectmpAxisLabelSet
 
GraphCollectionObjectmpAxisLineSet
 
bool mIsForRangeLegend
 Is this axis is used by a range legend. More...
 
bool mIsUniformAxis
 
- Protected Attributes inherited from MsiChart::GraphObjectManager
std::map< TripleId, GraphObject::PtrmGraphObjectMap
 
std::vector< GraphObject::PtrmGraphObjectList
 
std::vector< GraphObjectManager::PtrmGraphObjectManagerList
 This list keeps all the children of current GraphObjectManager. More...
 
const TripleId mTripleId
 Identifiy current GraphObjectManager. More...
 
ChartContext::Ptr mChartContextPtr
 The drawing context instance. Only one object in a chart. More...
 
GraphObjectManagermpManager
 The manager object which created the current object. More...
 
double mProgress
 
LayerObjectmpCurrentLayerObject
 

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::PtrMapPair
 

Detailed Description

Deals with some common options and operations of axis. Generally, there are following GraphObjects in the GraphObjectList or GraphObjectMap of Axis:

  1. Axis title.
  2. Axis line.
  3. A collection of Axis labels.
  4. A collection of grid lines. This class is the base class of ValueAxis and CategoryAxis.

Member Typedef Documentation

◆ Ptr

Constructor & Destructor Documentation

◆ Axis()

MsiChart::Axis::Axis ( const TripleId irTripleId,
GraphObjectManager ipManager,
unsigned char  iAxisLabelsLocation,
unsigned char  iAxisDirection 
)

Constructor

Parameters
irTripleIdentifies the object.
ipManagerPointer to the GraphObjectManager who created current object.
iAxisLabelsLocationIndicates where to show axis labels. Should be a value in EnumAxisLabelsLocation.
iAxisDirectionIndicates the direction of current axis. Should be a value in EnumAxisDirection.

◆ ~Axis()

virtual MsiChart::Axis::~Axis ( )
virtual

Member Function Documentation

◆ CreateAxisLine()

virtual void MsiChart::Axis::CreateAxisLine ( )
protectedvirtual

Create axis line. This is a helper method of GenerateAxisLine().

Reimplemented in MsiChart::ValueAxis.

◆ DrawTitleAndLabels()

void MsiChart::Axis::DrawTitleAndLabels ( )

Only used by uniform axis in GraphMatrix. Draw axis title and axis labels.

◆ GenerateAxisLine()

void MsiChart::Axis::GenerateAxisLine ( std::vector< GraphObject::Ptr > &  iorGraphObjectList)

Generate axis line

Parameters
iorGraphObjectListThe axis line will be put into iorGraphObjectList.

◆ GenerateGridLines() [1/2]

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.

Parameters
irDataAreaSpecify the data area of current chart area.
AreaIdSpecify the ID of current chart area.
iorGraphObjectListThe grid lines will be put into iorGraphObjectList.

◆ GenerateGridLines() [2/2]

void MsiChart::Axis::GenerateGridLines ( )

◆ GenerateInterlacedGrids()

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.

Parameters
irDataAreaSpecify the data area of current chart area.
AreaIdSpecify the ID of current chart area.
iorGraphObjectListIf depth is not used, the interlaced grids will be put into iorGraphObjectList.

◆ GenerateLabelsFor3D()

virtual void MsiChart::Axis::GenerateLabelsFor3D ( const std::vector< Point2D > &  irGridPoints,
const DVector2D irUnitOffsetDirection,
GraphCollectionObject ipLabelCollectioin,
std::vector< GraphObject::Ptr > &  iorGraphObjectList 
)
pure virtual

Generate labels of current axis in 3D chart.

Parameters
irGridPointsSpecifies the grid positions to indicate where the labels should be drawn.
irUnitOffsetDirectionSpecifies the direction of the labels relative to the grid positions.
ipLabelCollectionSpecifies the label collection object.
iorGraphObjectListThe labels will be appended to this list.

Implemented in MsiChart::ValueAxis, and MsiChart::CategoryAxis.

◆ GenerateOneLineObject()

void MsiChart::Axis::GenerateOneLineObject ( const TripleId irTripleId,
const std::vector< Point2D > &  irPolyLine,
GraphCollectionObject ipGridLineSet 
)
protected

Generate one grid line and put it into grid line collection and mGraphObjectList.

Parameters
irTripleSpecifies the TripleId of current grid line.
irPolyLineSpecifies the grid line.
ipGridLineSetPoints to a GraphCollectionObject which indicates the grid line collection.

◆ GenerateTitleFor3D()

void MsiChart::Axis::GenerateTitleFor3D ( Int32  iObjectId,
Point2D irRefPoint,
const DVector2D irUnitOffsetDirection,
std::vector< GraphObject::Ptr > &  iorGraphObjectList 
)

Generate title of current axis in 3D chart.

Parameters
iObjectIdSpecifies the Object ID for the axis title.
irRefPointSpecifies reference point to indicate where the labels should be drawn.
irUnitOffsetDirectionSpecifies the direction of the labels relative to irRefPoint.
iorGraphObjectListThe title will be appended to this list.

◆ GetAbsoluteCoord()

virtual float MsiChart::Axis::GetAbsoluteCoord ( double  iLogicalCoord)
pure virtual

return logical coordinate for trendline

Parameters
iLogicalCoordcoordinate
Returns
absolute coordinate

Implemented in MsiChart::ValueAxis, MsiChart::CategoryAxis, and MsiChart::PolarValueAxis.

◆ GetAxisLengthFor3D()

Int32 MsiChart::Axis::GetAxisLengthFor3D ( ) const
inline

Get axis length for 3D chart.

Returns
Return the length of current axis.

◆ GetAxisTitleLocationId()

Int32 MsiChart::Axis::GetAxisTitleLocationId ( Int32  iAxisTitleId) const

Get the object ID for the axis title of current axis in 3D chart.

Parameters
iAxisTitleId
Returns
Return the object ID of current axis title in 3D chart.

◆ GetDepthMargin()

void MsiChart::Axis::GetDepthMargin ( Int32 orLowMargin,
Int32 orHighMargin 
) const
protected

Get depth margins generated by depth axis line.

Parameters
iorLowMargin,iorHighMarginOutput the depth margins.

◆ GetDeviceDataArea()

void MsiChart::Axis::GetDeviceDataArea ( Rect2D orDeviceDataArea)
inline

Get device data area.

Parameters
orDeviceDataAreaOutput the rectangle of device data area

◆ GetGridLinePositionsFor3D()

virtual void MsiChart::Axis::GetGridLinePositionsFor3D ( std::vector< double > &  orGridLinePositions,
EnumGraphObjectType  iGraphObjectType 
) const
pure virtual

Get the grid line positions of current axis in 3D chart.

Parameters
orGridLinePositionsOutput the grid line positions.
iGraphObjectTypeIndicates 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.

◆ GetIndex()

Int32 MsiChart::Axis::GetIndex ( ) const
protected

Get the index in gAxisObjects from Axis ID.

Returns
Axis index in gAxisObject[].

◆ GetInterlacedGridId()

Int32 MsiChart::Axis::GetInterlacedGridId ( ) const

Get the object ID of interlaced grids for current axis.

Returns
Return the object ID of interlaced grids for current axis.

◆ GetInterlacedPositions()

virtual void MsiChart::Axis::GetInterlacedPositions ( std::vector< double > &  orPositions)
virtual

Reimplemented in MsiChart::CategoryAxis.

◆ GetIntervalSpace()

double MsiChart::Axis::GetIntervalSpace ( )

Get the interval space, for category axis, the group size; for value axis the space between 2 ticks.

◆ GetLabelOffset()

void MsiChart::Axis::GetLabelOffset ( Int32  iLabelLocation,
Point2D orOffset 
) const
protected

This is a helper method to update axis label location.

Parameters
iLabelLocationShould be a value in EnumAxisLabelsLocation. For convience, ALL_LEFT_RIGHT is treated as ALL_LEFT, and ALL_BOTTOM_TOP is treated as ALL_BOTTOM.
orOffsetOutput the offset of label location with consideration of depth.

◆ GetLabelRotation()

Int32 MsiChart::Axis::GetLabelRotation ( )

◆ GetLogicalCoord()

virtual double MsiChart::Axis::GetLogicalCoord ( Int32  iAbsoluteCoord)
pure virtual

return logical coordinate for trendline

Parameters
iAbsoluteCoordcoordinate along the axis
Returns
logical coordinate

Implemented in MsiChart::ValueAxis, MsiChart::CategoryAxis, and MsiChart::PolarValueAxis.

◆ GetMinMaxLogicalCoord()

virtual void MsiChart::Axis::GetMinMaxLogicalCoord ( double &  orMin,
double &  orMax 
) const
pure virtual

Get min tick and max tick of current axis in logical coordinate.

Parameters
orMinMin tick.
orMaxMax tick.

Implemented in MsiChart::ValueAxis, and MsiChart::CategoryAxis.

◆ GetObjectSet()

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;

Parameters
iGraphObjectTypeSpecifies a graph object type.
Returns
Return a GraphCollectonObject according to iGraphObjectType;

◆ GetOneGridLine()

void MsiChart::Axis::GetOneGridLine ( Int32  iLocation,
Int32  iGridStyle,
Int32  iTickLength,
const Point2D irLeftOrBottom,
const Point2D irRightOrTop,
std::vector< Point2D > &  orPolyLine 
)
protected

Get one grid line.

Parameters
iLocationShould 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.
iGridStyleSpecifies the style of current grid line.
iTickLenthSpecifies the tick length when iGridStyle is DssGraphGridInnerTicks or DssGraphGridOuterTicks.
irLeftOrBottom,irRightOrTopSpecifies the intersections of current grid line with axis lines assuming there is no depth.
orPolyLineOutput the grid line.

◆ GetOptions()

virtual void MsiChart::Axis::GetOptions ( Int32  iSeriesId,
Int32  iPropertyId,
CComVariant opValue 
) const
virtual

This function gets the options related to current GraphObjectManager.

Parameters
iSeriesIdSeries ID.
iPropertyIdSpecifies the property ID to be set.
opValueA pointer to VARIANT which is used to store property value.

Implements MsiChart::GraphObjectManager.

Reimplemented in MsiChart::CategoryAxis, and MsiChart::ValueAxis.

◆ GetPositionAtTick()

virtual double MsiChart::Axis::GetPositionAtTick ( double  iTickValue)
pure virtual

◆ GetSlopeFactor()

virtual double MsiChart::Axis::GetSlopeFactor ( double  iLogicalCoord) const
pure virtual

Get the slope factor (d(AbosluteVariable)/d(LogicalVariable)) at a speicified logical coordinate.

Parameters
iLogicalCoordSpecified a logical coordinate.

Implemented in MsiChart::ValueAxis, and MsiChart::CategoryAxis.

◆ GetUniformAxisExtraPadding()

virtual Int32 MsiChart::Axis::GetUniformAxisExtraPadding ( )
virtual

Get the padding between the pass-out plotarea and the label text

Reimplemented in MsiChart::ValueAxis, and MsiChart::CategoryAxis.

◆ HasDepthAxisLine()

bool MsiChart::Axis::HasDepthAxisLine ( Int32  iLabelLocation) const
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.

Returns
Return true if a depth axis line needs to be drawn according to iLabelLocation. Otherwise, return false.

◆ HasLabelsOnBothSides()

bool MsiChart::Axis::HasLabelsOnBothSides ( ) const
inlineprotected

Check whether the axis labels need to be shown on both sides or not.

Returns
Return true if the axis labels need to be shown on both sides.

◆ HasOuterTicks()

bool MsiChart::Axis::HasOuterTicks ( Int32  iGridStyle) const
inlineprotected

Check whether a given style of grid lines has outer ticks. Specifies a style of grid lines.

Returns
Return true if iGridStyle has outer ticks. Otherwise, return false.

◆ HasTwoGridLineParts()

bool MsiChart::Axis::HasTwoGridLineParts ( Int32  iGridStyle) const
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.

Returns
Return true if iGridStyle has two grid line parts when showing labels on both sides. Otherwise, return false.

◆ InitObjectSet()

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;

Parameters
irTripleIdSpecifies a TripleId for GraphCollectionObject.
iGraphObjectTypeSpecifies a graph object type.

◆ IsDownDirection()

bool MsiChart::Axis::IsDownDirection ( ) const
inlineprotected

Check whether current depth direction is downwards.

Returns
Return true if current depth direction is downwards. Otherwise, return false.

◆ IsInterlacedShown()

bool MsiChart::Axis::IsInterlacedShown ( ) const
inline

Check whether to show interlaced grids or not.

◆ IsLabelsShown()

bool MsiChart::Axis::IsLabelsShown ( ) const
inline

Check whether to show axis labels or not.

◆ IsLeftDirection()

bool MsiChart::Axis::IsLeftDirection ( ) const
inlineprotected

Check whether current depth direction is to the left.

Returns
Return true if current depth direction is to the left. Otherwise, return false.

◆ IsLogarithmic()

bool MsiChart::Axis::IsLogarithmic ( ) const
inlinevirtual

Check whether current ValueAxis use logarithmic scale or not.

Returns
Return true if current ValueAxis use logarithmic scale.

Reimplemented in MsiChart::ValueAxis.

◆ IsMajorGridShown()

bool MsiChart::Axis::IsMajorGridShown ( ) const
inline

Check whether to show major grid lines or not.

◆ IsReverseOrder()

bool MsiChart::Axis::IsReverseOrder ( )
inline

Check whether the axis labels should be shown in reverse order.

Returns
Return true if the axis labels should be shown in reverse order. Otherwise, return false.

◆ IsRightDirection()

bool MsiChart::Axis::IsRightDirection ( ) const
inlineprotected

Check whether current depth direction is to the right.

Returns
Return true if current depth direction is to the right. Otherwise, return false.

◆ IsTitleShown()

bool MsiChart::Axis::IsTitleShown ( ) const
inline

Check whether to show axis title or not.

◆ IsUniformAxis()

bool MsiChart::Axis::IsUniformAxis ( ) const
inline

Whether this axis is a uniform axis. Setter/Getter.

◆ IsUpDirection()

bool MsiChart::Axis::IsUpDirection ( ) const
inlineprotected

Check whether current depth direction is upwards.

Returns
Return true if current depth direction is upwards. Otherwise, return false.

◆ IsVerticalAxis()

bool MsiChart::Axis::IsVerticalAxis ( ) const
inlineprotected

Check whether current axis is vertical or not.

Returns
Return true if mAxisDirection is AD_Y. Otherwise, return false.

◆ LayoutAxis()

virtual Int32 MsiChart::Axis::LayoutAxis ( bool  iIsRotated,
Int32 orMaxLabelSpace 
)
pure virtual

To layout the axis in "Fit to Content" mode.

Returns
the total length/height of this axis. , x-axis or y-axis to layout, if it is y axis, no need to consider iIsRotated, since the labels will always be horizontally placed. , if the labels should be rotated, useful when it is x-axis. , the max space taken by one single label, if it is rotated, this is a fixed value.

Implemented in MsiChart::ValueAxis, and MsiChart::CategoryAxis.

◆ LoadProperties()

void MsiChart::Axis::LoadProperties ( )
protected

Load related properties of Axis from ChartContext.

◆ MoveGraphObjectList()

void MsiChart::Axis::MoveGraphObjectList ( std::vector< GraphObject::Ptr > &  iorGraphObjectList)
protected

Move graph objects from mManagerGraphObjectList to iorGraphObjectList.

Parameters
iorGraphObjectListManager's graphObject list.

◆ MoveLabel()

void MsiChart::Axis::MoveLabel ( TextObject ipLabel,
const Point2D irGridPoint,
const DVector2D irUnitOffsetDirection,
Int32  iLabelMargin = gLabelMargin 
) const
protected

Move one axis label to an appropriate position.

Parameters
ipLabelSpecifies a label.
irGridPointSpecifies a corresonding grid point for this label.
irUnitOffsetDirectionThis is a unit vector which indicates the offset direction from irGridPoint.
iLabelMarginSpecifies the margin between the label and irGridPoint.

◆ MoveTitleForManual()

void MsiChart::Axis::MoveTitleForManual ( TextObject ipAxisTitle) const
protected

Move title for manual layout.

Parameters
ipAxisTitleSpecifies the axis title which needs to be moved.

◆ OnPointDetection()

virtual GraphObject::Ptr MsiChart::Axis::OnPointDetection ( const Point2D irCursor) const
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.

Parameters
irCursorThe coordinate of cursor.
Returns
Smart pointer to the selected object. NULL if no selected object is found.

Reimplemented from MsiChart::GraphObjectManager.

◆ OnZooming()

virtual void MsiChart::Axis::OnZooming ( Int32  iOldStart,
Int32  iOldEnd,
Int32  iNewStart,
Int32  iNewEnd 
)
pure virtual

Handles zooming event.

Parameters
iOldStart,iOldEndSpecifies an old range.
iNewStart,iNewEndSpecifies a new range.

Implemented in MsiChart::ValueAxis, and MsiChart::CategoryAxis.

◆ ReserveDepthAxisLine()

void MsiChart::Axis::ReserveDepthAxisLine ( Rect2D iorDeviceDataArea,
bool  iIsReversed = false,
bool  iBothDirections = false 
) const
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.

Parameters
iorDeviceDataAreaIndicates the reference rectangle for data area.
iIsReversedIf 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.
iBothDirectionIndicate whehter to reserve depth line at both directions.

◆ ReserveTitle()

void MsiChart::Axis::ReserveTitle ( Rect2D iorTitleArea,
bool  iIsReversed 
)
protected

This method is used to reserve title area according to a reference rectangle.

Parameters
iorTitleAreaIndicates the reference rectangle of axis title.
iIsReversedIf this parameter is false, iorTitleArea will be adjusted by substracting title area. Otherwise, it will be adjusted by adding title area.

◆ ReserveTitleArea()

void MsiChart::Axis::ReserveTitleArea ( Rect2D iorTitleArea)

Generate title and reserve title area

Parameters
iorTitleAreaThis area will be adjusted by subtracting title area.

◆ SetAsUniformAxis()

void MsiChart::Axis::SetAsUniformAxis ( bool  iUniformAxis)
inline

◆ SetAxisInfoFor3D()

void MsiChart::Axis::SetAxisInfoFor3D ( Int32  iAxisLength,
Int32  iAxisMargin 
)
inline

Set axis information for 3D chart.

Parameters
iAxisLengthSpecifies the length of current axis.
iAxisMarginSpecifies the margin of current axis.

◆ SetDepthAndDirection()

void MsiChart::Axis::SetDepthAndDirection ( Int32  iDepth,
Int32  iDepthDirection 
)

Set depth value and depth direction. If this method is called, mUseDepth with be set to true.

Parameters
iDepthDepth value.
iDepthDirectionDepth direction.

◆ SetDeviceDataArea()

void MsiChart::Axis::SetDeviceDataArea ( const Rect2D irDeviceDataArea)
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.

Parameters
irDeviceDataAreaReference to the data area of current axis.

◆ SetIsAxisForRangeLegend()

void MsiChart::Axis::SetIsAxisForRangeLegend ( bool  iIsForRangeLegend)

Denote whether this axis is associated with a range legend

◆ TrimAxisPadding()

virtual void MsiChart::Axis::TrimAxisPadding ( Rect2D iorRect,
bool  iUseFixedMargin = true 
)
virtual

◆ TrimMarginsForDepthAxis()

void MsiChart::Axis::TrimMarginsForDepthAxis ( Int32 iorLowMargin,
Int32 iorHighMargin 
) const
protected

This method trims the input margins for the space reserved by depth axis line. This method is useful for X and Category axis.

Parameters
iorLowMargin,iorHighMarginSpecifies the margins which need to be trimed.

◆ UpdateTitleLocation()

void MsiChart::Axis::UpdateTitleLocation ( const Rect2D irTitleArea)
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.

Parameters
irTitleAreaIndicates the reference rectangle of axis title.

◆ ValueToPositionFor3D()

double MsiChart::Axis::ValueToPositionFor3D ( double  iLogicalCoord) const

Get 3D absolute coordinate from logical coordinate

Parameters
iLogicalCoordSpecifies a logical coordinate.
Returns
3D absolute coordinate along current axis.

Member Data Documentation

◆ mAxisInfo

GraphAxisGeneral MsiChart::Axis::mAxisInfo
protected

General axis properties.

◆ mAxisLengthFor3D

Int32 MsiChart::Axis::mAxisLengthFor3D
protected

◆ mAxisMarginFor3D

Int32 MsiChart::Axis::mAxisMarginFor3D
protected

◆ mAxisTitle

MBase::String MsiChart::Axis::mAxisTitle
protected

Axis title string.

◆ mDepth

Int32 MsiChart::Axis::mDepth
protected

Indicate the depth value.

◆ mDepthDirection

Int32 MsiChart::Axis::mDepthDirection
protected

Indicate the depth direction.

◆ mDepthOffset

Point2D MsiChart::Axis::mDepthOffset
protected

Indicate the depth offset.

◆ mDeviceDataArea

Rect2D MsiChart::Axis::mDeviceDataArea
protected

Indicate the data area of current axis.

◆ mHighTrim

double MsiChart::Axis::mHighTrim
protected

When depth is not used, the grid lines need to be put into manager's graph object list.

◆ mIsAxisFor3D

bool MsiChart::Axis::mIsAxisFor3D
protected

◆ mIsForRangeLegend

bool MsiChart::Axis::mIsForRangeLegend
protected

Is this axis is used by a range legend.

◆ mIsUniformAxis

bool MsiChart::Axis::mIsUniformAxis
protected

◆ mLowTrim

double MsiChart::Axis::mLowTrim
protected

◆ mMajorGrid

GraphAxisGrid MsiChart::Axis::mMajorGrid
protected

Properties of major grid lines.

◆ mManagerGraphObjectList

std::vector<GraphObject::Ptr> MsiChart::Axis::mManagerGraphObjectList
protected

◆ mMinorGrid

GraphAxisGrid MsiChart::Axis::mMinorGrid
protected

Properties of minor grid lines.

◆ mpAxisLabelSet

GraphCollectionObject* MsiChart::Axis::mpAxisLabelSet
protected

◆ mpAxisLineSet

GraphCollectionObject* MsiChart::Axis::mpAxisLineSet
protected

◆ mpAxisTitleSet

GraphCollectionObject* MsiChart::Axis::mpAxisTitleSet
protected

◆ mpInterlacedGridSet

GraphCollectionObject* MsiChart::Axis::mpInterlacedGridSet
protected

◆ mpMajorGridSet

GraphCollectionObject* MsiChart::Axis::mpMajorGridSet
protected

◆ mpMinorGridSet

GraphCollectionObject* MsiChart::Axis::mpMinorGridSet
protected

◆ mTickLength

Int32 MsiChart::Axis::mTickLength
protected

Tick Length.

◆ mUseDepth

bool MsiChart::Axis::mUseDepth
protected

Indicate whether to use depth or not.