/** * @file XTPChartFunnelSeriesViewBase.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(__XTPCHARTFUNNELSERIESVIEWBASE_H__) # define __XTPCHARTFUNNELSERIESVIEWBASE_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartSeriesView; class CXTPChartBorder; class CXTPChartFillStyle; class CXTPChartDiagramDomain; /** * @brief * This class abstracts the view of a funnel series.This class is a kind of * CXTPChartSeriesView. * * @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 CXTPChartFunnelSeriesViewBase : public CXTPChartSeriesView { DECLARE_DYNAMIC(CXTPChartFunnelSeriesViewBase); public: /** * @brief * Constructs a CXTPChartFunnelSeriesViewBase object. * * @param pSeries Pointer to funnel series object. * @param pDiagramView Pointer to the funnel diagram view. */ CXTPChartFunnelSeriesViewBase(CXTPChartSeries* pSeries, CXTPChartDiagramView* pDiagramView); /** * @brief * Destroys a CXTPChartFunnelSeriesViewBase object, handle cleanup. */ virtual ~CXTPChartFunnelSeriesViewBase(); public: /** * @brief * Call this function to calculate the funnel series point layout. * * @param pDC Pointer to the chart device context. * @param rcBounds The rectangular boundary. */ virtual void CalculatePointLayout(CXTPChartDeviceContext* pDC, CRect rcBounds); /** * @brief * Call this function to calculate the funnel series label layout. * * @param pDC Pointer to the chart device context. */ void CalculateLabelLayout(CXTPChartDeviceContext* pDC); /** * @brief * Call this function to create the pie diagram domain object associated * with this object. * * @param rcBounds The rectangular boundary of the diagram. * @param pDC Pointer to the chart device context. * * @return * A pointer to the chart diagram domain object. */ virtual CXTPChartDiagramDomain* CreateDiagramDomain(CXTPChartDeviceContext* pDC, CRect rcBounds); /** * @brief * Call this function to get the inner bounds of the diagram. * * @return * A chart rect object denoting the rectangular boundary. */ virtual CXTPChartRectF GetInnerBounds() const; /** * @brief * Use this function to get the pie diagram domain object associated with * this object. * * @return * A pointer to the chart diagram domain object. */ CXTPChartDiagramDomain* GetDomain() const; /** * @brief * Obtains maximum allowed label width. * * @return * Maximum allowed label width. */ int GetMaxLabelWidth() const; /** * @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. * @param color1 First gradient color. * @param color2 Second gradient color. * @param clrBorder A COLORREF valueobject that representrscontains the border color * * @return * Returns a new label view drawing command object. */ virtual CXTPChartDeviceCommand* CreateLegendDeviceCommand(CXTPChartDeviceContext* pDC, CRect rcBounds, CXTPChartColor color1, CXTPChartColor color2, CXTPChartColor clrBorder) = 0; protected: /** * @brief * Use this function to create the funnel series point view object. * * @param pDC Pointer to chart device context. * @param pPoint Pointer to chart series point. * @param pParentView Parent view pointer. * * @return * A pointer to the chart series point view. */ virtual CXTPChartSeriesPointView* CreateSeriesPointView(CXTPChartDeviceContext* pDC, CXTPChartSeriesPoint* pPoint, CXTPChartElementView* pParentView) = 0; /** * @brief * This function creates a CXTPChartDeviceCommand object, this object * represents the rendering of the funnel series. * * @param pDC Pointer to a CXTPChartDeviceContext object. * * @return * Returns CXTPChartDeviceCommand object, this object handles * the rendering of an element in the chart. Here it handles * the drawing of the funnel series. */ 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) = 0; /** @cond */ void CalculateValues(); /** @endcond */ protected: CXTPChartDiagramDomain* m_pDomain; /**< Pointer to the diagram domain.*/ int m_nMaxLabelWidth; }; AFX_INLINE CXTPChartDiagramDomain* CXTPChartFunnelSeriesViewBase::GetDomain() const { return m_pDomain; } AFX_INLINE int CXTPChartFunnelSeriesViewBase::GetMaxLabelWidth() const { return m_nMaxLabelWidth; } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTFUNNELSERIESVIEWBASE_H__) /** @endcond */