/** * @file XTPChartFunnelSeriesPointViewBase.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(__XTPCHARTFUNNELSERIESPOINTVIEWBASE_H__) # define __XTPCHARTFUNNELSERIESPOINTVIEWBASE_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartSeriesPoint; class CXTPChartElementView; class CXTPChartDeviceContext; class CXTPChartFunnelSeriesView; /** * @brief * This class abstracts the view of a funnel series point. This class is a kind of * CXTPChartSeriesPointView. * * @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 CXTPChartFunnelSeriesPointViewBase : public CXTPChartSeriesPointView { DECLARE_DYNAMIC(CXTPChartFunnelSeriesPointViewBase); public: /** * @brief * Constructs a CXTPChartFunnelSeriesPointView object. * * @param pPoint Pointer to chart series point. * @param pParentView The pointer to the parent view object. */ CXTPChartFunnelSeriesPointViewBase(CXTPChartSeriesPoint* pPoint, CXTPChartElementView* pParentView); /** * @brief * Constructs a CXTPChartFunnelSeriesPointView object. * * @param pPoint Pointer to chart series point. * @param pParentView The pointer to the parent view object. * @param bAddToParent If TRUE the view will be be added to parent's child view list. */ CXTPChartFunnelSeriesPointViewBase(CXTPChartSeriesPoint* pPoint, CXTPChartElementView* pParentView, BOOL bAddToParent); /** * @brief * Destroys a CXTPChartFunnelSeriesPointView object, handle cleanup. */ virtual ~CXTPChartFunnelSeriesPointViewBase(); public: /** * @brief * Use this function to calculate the layout of the funnel series point. * * @param nIndex Point index. * @param nCount Number of points. * @param dFrom Point start value. * @param dTo Value part point value end. */ virtual void CalculateLayout(int nIndex, int nCount, double dFrom, double dTo); /** * @brief * Obtains border color value. * * @return * Border color value. */ CXTPChartColor GetBorderActualColor() const; protected: /** * @brief * This function creates a CXTPChartDeviceCommand object. This object * represents the rendering of the funnel series point. * * @param pDC Pointer to a CXTPChartDeviceContext object. * * @return * Returns a CXTPChartDeviceCommand object. This object handles * the rendering of an element in the chart. Here it handles * the drawing of the funnel series point. */ virtual CXTPChartDeviceCommand* CreateDeviceCommand(CXTPChartDeviceContext* pDC) = 0; /** * @brief * This function creates a label view drawing command object. * * @param pDC Pointer to a CXTPChartDeviceContext object. * @param rcBounds The rectangular boundary of the legend. * * @return * Returns a new label view drawing command object. */ virtual CXTPChartDeviceCommand* CreateLegendDeviceCommand(CXTPChartDeviceContext* pDC, CRect rcBounds); protected: double m_dValue; /**< The value of the point.*/ public: CXTPChartRectF m_rc; double m_dFrom; double m_dTo; protected: double m_dWidth; double m_dHeight; friend class CXTPChartFunnelSeriesViewBase; friend class CXTPChartFunnelSeriesView; friend class CXTPChart3dFunnelSeriesView; friend class CXTPChart3dFunnelSeriesPointView; }; /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTFUNNELSERIESPOINTVIEWBASE_H__) /** @endcond */