/** * @file XTPChartDiagram2DSeriesStyle.h * * @copyright * (c) 1998-2025 Codejock Software, All Rights Reserved. * * This source file is the property of Codejock Software and must not be * redistributed by any means without the explicit written permission of * Codejock Software. * * The use of this source code is governed by the terms and conditions specified * in the Toolkit Pro license agreement. Codejock Software grants you, as a * single software developer, the limited right to use this software on one * computer only. * * Contact Information: * support@codejock.com * http://www.codejock.com * */ /** @cond */ #if !defined(__XTPCHARTDIAGRAM2DSERIESSTYLE_H__) # define __XTPCHARTDIAGRAM2DSERIESSTYLE_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartSeriesView; class CXTPChartMarker; /** * @brief * This class represents a line series style, which is a kind of * CXTPChartSeriesStyle. * * @details * A point chart is a type of graph which displays information as a * series of data points. It is a basic type of chart common in many * fields. */ class _XTP_EXT_CLASS CXTPChartDiagram2DSeriesStyle : public CXTPChartSeriesStyle { /** @cond */ DECLARE_DYNAMIC(CXTPChartDiagram2DSeriesStyle) /** @endcond */ public: /** * @brief * Constructs a CXTPChartDiagram2DSeriesStyle object. */ CXTPChartDiagram2DSeriesStyle(); /** * @brief * Destroys a CXTPChartDiagram2DSeriesStyle object, handles cleanup. */ virtual ~CXTPChartDiagram2DSeriesStyle(); public: void SetSecondaryAxisX(BOOL bSecondaryAxis); BOOL IsSecondaryAxisX() const; void SetSecondaryAxisY(BOOL bSecondaryAxis); BOOL IsSecondaryAxisY() const; void SetAxisIndexX(int nAxisIndexX); int GetAxisIndexX() const; void SetAxisIndexY(int nAxisIndexY); int GetAxisIndexY() const; public: void DoPropExchange(CXTPPropExchange* pPX); public: /** * @brief * Call this function to create the diagram for this series. * * @return A pointer to a CXTPChartDiagram object which points to the newly created * CXTPChartDiagram2D object. */ virtual CXTPChartDiagram* CreateDiagram(); /** * @brief * Call this function to check whether the chart diagram object passed * is a kind of 2D diagram (CXTPChartDiagram2D object). * * @param pDiagram A pointer to a chart diagram whose type is to be identified. * * @return A BOOL value. TRUE if the chart diagram is a 2D diagram, FALSE otherwise. */ virtual BOOL IsStyleDiagram(CXTPChartDiagram* pDiagram) const; # ifdef _XTP_ACTIVEX public: /** @cond */ DECLARE_DISPATCH_MAP() DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPChartDiagram2DSeriesStyle); /** @endcond */ # endif protected: BOOL m_bSecondaryAxisX; BOOL m_bSecondaryAxisY; int m_nAxisIndexX; /**< Holds index of secondary axisX, used when m_bSecondaryAxisX is TRUE.*/ int m_nAxisIndexY; /**< Holds index of secondary axisY, used when m_bSecondaryAxisY is TRUE.*/ }; AFX_INLINE void CXTPChartDiagram2DSeriesStyle::SetSecondaryAxisX(BOOL bSecondaryAxis) { if (m_bSecondaryAxisX != bSecondaryAxis) { m_bSecondaryAxisX = bSecondaryAxis; OnChartChanged(); } } AFX_INLINE BOOL CXTPChartDiagram2DSeriesStyle::IsSecondaryAxisX() const { return m_bSecondaryAxisX; } AFX_INLINE void CXTPChartDiagram2DSeriesStyle::SetSecondaryAxisY(BOOL bSecondaryAxis) { if (m_bSecondaryAxisY != bSecondaryAxis) { m_bSecondaryAxisY = bSecondaryAxis; OnChartChanged(); } } AFX_INLINE BOOL CXTPChartDiagram2DSeriesStyle::IsSecondaryAxisY() const { return m_bSecondaryAxisY; } AFX_INLINE void CXTPChartDiagram2DSeriesStyle::SetAxisIndexX(int nAxisIndexX) { if (nAxisIndexX > 0 && nAxisIndexX != m_nAxisIndexX) { m_nAxisIndexX = nAxisIndexX; OnChartChanged(); } } AFX_INLINE int CXTPChartDiagram2DSeriesStyle::GetAxisIndexX() const { if (m_bSecondaryAxisX == FALSE) return 0; return m_nAxisIndexX; } AFX_INLINE void CXTPChartDiagram2DSeriesStyle::SetAxisIndexY(int nAxisIndexY) { if (nAxisIndexY > 0 && nAxisIndexY != m_nAxisIndexY) { m_nAxisIndexY = nAxisIndexY; OnChartChanged(); } } AFX_INLINE int CXTPChartDiagram2DSeriesStyle::GetAxisIndexY() const { if (m_bSecondaryAxisY == FALSE) return 0; return m_nAxisIndexY; } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTDIAGRAM2DSERIESSTYLE_H__) /** @endcond */