/** * @file XTPChartLineSeriesStyle.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(__XTPCHARTLINESERIESSTYLE_H__) # define __XTPCHARTLINESERIESSTYLE_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartSeriesView; class CXTPChartLineStyle; /** * @brief * This class represents a line series style, which is a kind of * CXTPChartPointSeriesStyle. * * @details * A line chart or line graph is a type of graph which displays information * as a series of data points connected by straight line segments. It is a * basic type of chart common in many fields. */ class _XTP_EXT_CLASS CXTPChartLineSeriesStyle : public CXTPChartPointSeriesStyle { /** @cond */ DECLARE_SERIAL(CXTPChartLineSeriesStyle) /** @endcond */ public: /** * @brief * Constructs a CXTPChartLineSeriesStyle object. */ CXTPChartLineSeriesStyle(); /** * @brief * Destroys a CXTPChartLineSeriesStyle object, handles cleanup. */ virtual ~CXTPChartLineSeriesStyle(); public: /** * @brief * Call this function to get the line style of the line series. * * @return * A pointer to chart line style object. */ CXTPChartLineStyle* GetLineStyle() const; protected: /** * @brief * Call this function to create a view of the line series. * * @param pSeries A pointer to the 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); void DoPropExchange(CXTPPropExchange* pPX); # ifdef _XTP_ACTIVEX public: /** @cond */ DECLARE_DISPATCH_MAP() DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPChartLineSeriesStyle); DECLARE_OLECREATE_EX(CXTPChartLineSeriesStyle) LPDISPATCH OleGetLineStyle(); /** @endcond */ # endif protected: CXTPChartLineStyle* m_pLineStyle; /**< The line style.*/ }; /** * @brief * This class represents the view of a line series, which is a kind of * CXTPChartSeriesView. */ class _XTP_EXT_CLASS CXTPChartLineSeriesView : public CXTPChartDiagram2DSeriesView { public: /** * @brief * Constructs a CXTPChartLineSeriesView object. * * @param pSeries A pointer to the chart series object. * @param pDiagramView A pointer to the diagram view object. * @param bSortPoints TRUE to sort points. */ CXTPChartLineSeriesView(CXTPChartSeries* pSeries, CXTPChartDiagramView* pDiagramView, BOOL bSortPoints = TRUE); protected: /** * @brief * Call this function to create a view of the line 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 line 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 line series. */ virtual CXTPChartDeviceCommand* CreateDeviceCommand(CXTPChartDeviceContext* pDC); /** * @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); }; AFX_INLINE CXTPChartLineStyle* CXTPChartLineSeriesStyle::GetLineStyle() const { return m_pLineStyle; } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTLINESERIESSTYLE_H__) /** @endcond */