/** * @file XTPChartFunnelSeriesStyleBase.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(__XTPCHARTFUNNELSERIESSTYLEBASE_H__) # define __XTPCHARTFUNNELSERIESSTYLEBASE_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartSeriesView; class CXTPChartBorder; class CXTPChartFillStyle; /** * @brief * This class abstracts the basic style of a funnel serie.This class is a kind of * CXTPChartSeriesStyle. * * @details * A funnel chart (or a circle graph) is a circular chart divided into sectors, * illustrating percents. In a funnel chart, the arc length of each sector (and * consequently its central angle and area), is proportional to the quantity * it represents. Together, the sectors create a full disk. */ class _XTP_EXT_CLASS CXTPChartFunnelSeriesStyleBase : public CXTPChartSeriesStyle { /** @cond */ DECLARE_DYNAMIC(CXTPChartFunnelSeriesStyleBase) /** @endcond */ public: /** * @brief * Constructs a CXTPChartFunnelSeriesStyleBase object. */ CXTPChartFunnelSeriesStyleBase(); /** * @brief * Destroys a CXTPChartFunnelSeriesStyleBase object, handle cleanup. */ virtual ~CXTPChartFunnelSeriesStyleBase(); public: /** * @brief * Gets point distance value. * * @return * Current distance value. */ int GetPointDistance() const; /** * @brief * Sets point distance value. * * @param nPointDistance Distance value. */ void SetPointDistance(int nPointDistance); /** * @brief * Gets height to width ratio of the funnel. * * @return * Current ratio value. */ double GetHeightToWidthRatio() const; /** * @brief * Sets height to width ratio of the funnel. * * @param dRatio Ratio value. */ void SetHeightToWidthRatio(double dRatio); /** * @brief * Sets equal height flag. * * @param bEqualHeight TRUE to make funnel points to have equal heights, otherwise FALSE. */ void SetEqualHeight(BOOL bEqualHeight); /** * @brief * Gets equal height flag. * * @return * Current equal height flag. */ BOOL IsEqualHeight() const; /** * @brief * Call this function to get the background fill style. * * @return * Returns the pointer to CXTPChartFillStyle object, which abstracts * various fill styles. */ CXTPChartFillStyle* GetFillStyle() const; /** * @brief * Call this function to get the border object. * * @return * Border object pointer. */ CXTPChartBorder* GetBorder() const; /** * @brief * Reads or writes this object from or to an archive. * * @param pPX A CXTPPropExchange object to serialize to or from. */ void DoPropExchange(CXTPPropExchange* pPX); protected: /** * @brief * This method is called to allow style create diagram object * * @return * New diagram object that will contain series. */ CXTPChartDiagram* CreateDiagram() = 0; /** * @brief * This virtual method is called to create new view associated with current style. * * @param pSeries Series associated with style * @param pDiagramView Parent diagram view * * @return * Pointer to new CXTPChartSeriesView object. */ CXTPChartSeriesView* CreateView(CXTPChartSeries* pSeries, CXTPChartDiagramView* pDiagramView) = 0; /** * @brief * This method is called to ask style if series can be inserted in existing diagram * * @param pDiagram Diagram to check * * @return * TRUE if Series can be inserted to Diagram */ BOOL IsStyleDiagram(CXTPChartDiagram* pDiagram) const; /** @cond */ # ifdef _XTP_ACTIVEX public: DECLARE_DISPATCH_MAP() DECLARE_INTERFACE_MAP() # endif /** @endcond */ protected: /** @cond */ double m_dHeightToWidthRatio; int m_nPointDistance; CXTPChartBorder* m_pBorder; CXTPChartFillStyle* m_pFillStyle; BOOL m_bEqualHeight; /** @endcond */ }; AFX_INLINE int CXTPChartFunnelSeriesStyleBase::GetPointDistance() const { return m_nPointDistance; } AFX_INLINE void CXTPChartFunnelSeriesStyleBase::SetPointDistance(int nPointDistance) { m_nPointDistance = nPointDistance; OnChartChanged(); } AFX_INLINE CXTPChartFillStyle* CXTPChartFunnelSeriesStyleBase::GetFillStyle() const { return m_pFillStyle; } AFX_INLINE CXTPChartBorder* CXTPChartFunnelSeriesStyleBase::GetBorder() const { return m_pBorder; } AFX_INLINE void CXTPChartFunnelSeriesStyleBase::SetHeightToWidthRatio(double dRatio) { m_dHeightToWidthRatio = dRatio; OnChartChanged(); } AFX_INLINE double CXTPChartFunnelSeriesStyleBase::GetHeightToWidthRatio() const { return m_dHeightToWidthRatio; } AFX_INLINE void CXTPChartFunnelSeriesStyleBase::SetEqualHeight(BOOL bEqualHeight) { m_bEqualHeight = bEqualHeight; OnChartChanged(); } AFX_INLINE BOOL CXTPChartFunnelSeriesStyleBase::IsEqualHeight() const { return m_bEqualHeight; } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTFUNNELSERIESSTYLEBASE_H__) /** @endcond */