/** * @file XTPChartBubbleSeriesStyle.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(__XTPCHARTBUBBLESERIESSTYLE_H__) # define __XTPCHARTBUBBLESERIESSTYLE_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartSeriesView; /** * @brief * This class represents a bubble series style, which is a kind of * CXTPChartPointSeriesStyle. * * @details * A bubble chart is a type of chart where each plotted entity is defined * in terms of three distinct numeric parameters. Bubble charts can facilitate * the understanding of the social, economical, medical, and other scientific * relationships. */ class _XTP_EXT_CLASS CXTPChartBubbleSeriesStyle : public CXTPChartPointSeriesStyle { /** @cond */ DECLARE_SERIAL(CXTPChartBubbleSeriesStyle) /** @endcond */ public: /** * @brief * Constructs a CXTPChartBubbleSeriesStyle object. */ CXTPChartBubbleSeriesStyle(); /** * @brief * Destroys a CXTPChartBubbleSeriesStyle object, handles cleanup. */ virtual ~CXTPChartBubbleSeriesStyle(); public: /** * @brief * Gets the miminum bubble size value. * * @return * The current minimum bubble size value. */ double GetMinSize() const; /** * @brief * Sets the miminum bubble size value. * * @param dMinSize The miminum bubble size value. */ void SetMinSize(double dMinSize); /** * @brief * Gets the maximum bubble size value. * * @return * The current maximum bubble size value. */ double GetMaxSize() const; /** * @brief * Sets the maximum bubble size value. * * @param dMinSize The maximum bubble size value. */ void SetMaxSize(double dMinSize); /** * @brief * Obtains the index of a point element for which an internal value * can be otained. * * @return * The index of a point element for which an internal value * can be otained. */ virtual int GetSeriesPointValueIndex() const; /** * @brief * Reads this object from or writes this object to an archive. * * @param pPX A CXTPPropExchange object to serialize to or from. */ virtual void DoPropExchange(CXTPPropExchange* pPX); protected: /** * @brief * Call this function to create a view of the bubble series. * * @param pSeries A pointer to chart series object. * @param pDiagramView A pointer to the diagram view object. * * @return * Returns a pointer to the associated series view object. */ virtual CXTPChartSeriesView* CreateView(CXTPChartSeries* pSeries, CXTPChartDiagramView* pDiagramView); protected: /** * @brief * Call this function to correct the axis side margins. * * @param pAxis A pointer to the chart axis object to which this object * is associated with. * @param nMinValue A double specifying the minimum value. * @param nMaxValue A double specifying the maximum value. * @param nCorrection A reference to a double object which specifies the correction * applied. */ void CorrectAxisSideMargins(CXTPChartAxis* pAxis, double nMinValue, double nMaxValue, double& nCorrection); # ifdef _XTP_ACTIVEX public: /** @cond */ DECLARE_DISPATCH_MAP() DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPChartBubbleSeriesStyle); DECLARE_OLECREATE_EX(CXTPChartBubbleSeriesStyle) double OleGetMinSize(); void OleSetMinSize(double dMinSize); double OleGetMaxSize(); void OleSetMaxSize(double dMinSize); /** @endcond */ # endif using CXTPChartPointSeriesStyle::m_nTransparency; double m_dMinSize; double m_dMaxSize; }; /** * @brief * This class represents the view of a bubble series, which is a kind of * CXTPChartSeriesView. * * @details * A bubble chart is a type of chart where each plotted entity is defined * in terms of three distinct numeric parameters. Bubble charts can facilitate * the understanding of the social, economical, medical, and other scientific * relationships. */ class _XTP_EXT_CLASS CXTPChartBubbleSeriesView : public CXTPChartPointSeriesView { public: /** * @brief * Constructs a CXTPChartBubbleSeriesView object. * * @param pSeries A pointer to the chart series object. * @param pDiagramView A pointer to the diagram view object. */ CXTPChartBubbleSeriesView(CXTPChartSeries* pSeries, CXTPChartDiagramView* pDiagramView); protected: /** * @brief * Call this function to create a view of the bubble series point. * * @param pDC A pointer to chart device context. * @param pPoint A pointer to the chart series point object. * @param pParentView Parent view pointer. * * @return * Returns a pointer to the associated series point view object. */ CXTPChartSeriesPointView* CreateSeriesPointView(CXTPChartDeviceContext* pDC, CXTPChartSeriesPoint* pPoint, CXTPChartElementView* pParentView); /** * @brief * This function creates a CXTPChartDeviceCommand object. This object * represents the rendering of a bubble series. * * @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 bubble series. */ virtual CXTPChartDeviceCommand* CreateDeviceCommand(CXTPChartDeviceContext* pDC); protected: /** * @brief * Creates the view object. * * @param pDC Target device context pointers. */ void CreatePointsView(CXTPChartDeviceContext* pDC); double m_dMinValue; double m_dMaxValue; friend class CXTPChartBubbleSeriesPointView; }; /** * @brief * This class represents the view of a bubble series point, which is a kind of * CXTPChartPointSeriesPointView. * * @details * A bubble chart is a type of chart where each plotted entity is defined * in terms of three distinct numeric parameters. Bubble charts can facilitate * the understanding of the social, economical, medical, and other scientific * relationships. */ class _XTP_EXT_CLASS CXTPChartBubbleSeriesPointView : public CXTPChartPointSeriesPointView { public: /** * @brief * Constructs a CXTPChartBubbleSeriesPointView object. * * @param pPoint A pointer to the chart series point object. * @param pParentView The parent view of the axis. */ CXTPChartBubbleSeriesPointView(CXTPChartSeriesPoint* pPoint, CXTPChartElementView* pParentView); public: /** * @brief * This function creates a CXTPChartDeviceCommand object. This object * represents the rendering of a bubble series point. * * @param pDC Pointer to a CXTPChartDeviceContext object. * * @return * Returns a CXTPChartPolygonAntialiasingDeviceCommand object. This * object handles the rendering of an element in the chart. Here * it handles the drawing of the bubble series point. */ virtual CXTPChartDeviceCommand* CreateDeviceCommand(CXTPChartDeviceContext* pDC); public: /** * @brief * Call this function to get the actual color. * * @return * A CXTPChartColor object representing an ARGB value. */ CXTPChartColor GetActualColor() const; /** * @brief * Call this function to get the second actual color. * * @return * A CXTPChartColor object representing an ARGB value. */ CXTPChartColor GetActualColor2() const; }; AFX_INLINE double CXTPChartBubbleSeriesStyle::GetMinSize() const { return m_dMinSize; } AFX_INLINE void CXTPChartBubbleSeriesStyle::SetMinSize(double dMinSize) { m_dMinSize = dMinSize; OnChartChanged(); } AFX_INLINE double CXTPChartBubbleSeriesStyle::GetMaxSize() const { return m_dMaxSize; } AFX_INLINE void CXTPChartBubbleSeriesStyle::SetMaxSize(double dMaxSize) { m_dMaxSize = dMaxSize; OnChartChanged(); } AFX_INLINE int CXTPChartBubbleSeriesStyle::GetSeriesPointValueIndex() const { return 1; } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTBUBBLESERIESSTYLE_H__) /** @endcond */