LineChart.h
上传用户:hbytqc8
上传日期:2014-07-31
资源大小:527k
文件大小:2k
- // LineChart.h: interface for the CLineChart class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_LINECHART_H__754AC4E3_07E2_4566_8B88_16C1ACC0BDDB__INCLUDED_)
- #define AFX_LINECHART_H__754AC4E3_07E2_4566_8B88_16C1ACC0BDDB__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "AfxTempl.h"
- class CLineChart : public CStatic
- {
- public:
- CLineChart(CSize cs,int row);
- // Attributes
- protected:
- int StartPos;
- int oldX,oldY;
- bool Cross,Useage;
- CString title,xLegend,yLegend;
- CFont tFont;
- CSize ChartSize;
- int Count;
- unsigned long Number,yMax,Temp_yMax;
- unsigned long xAverage,yAverage;
- unsigned long x_Max,x_Min,y_Max,y_Min;
- int interval;
- struct LineData
- {
- unsigned long x;
- unsigned long y;
- int xUse;
- int yUse;
- CString xTime;
- bool show;
- };
- CArray <LineData,LineData&> ArrayData;
- // Operations
- public:
- void Append(unsigned long x1,unsigned long y1,CString tt,int ux,int uy);
- void Init();
- void SetTitle(CString str);
- void SetLegend(CString xStr,CString yStr);
- void SetCross(bool tf);
- unsigned long GetXAverage();
- unsigned long GetYAverage();
- void AddData(unsigned long x1,unsigned long y1,CString tt,
- int ux,int uy,int index,bool tf);
- void ToLeft();
- void ToRight();
- void SetUse(bool tf);
- CString GetXMax();
- CString GetYMax();
- CString GetXMin();
- CString GetYMin();
- //void ChangeInt(int x);
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CLineChart)
- //}}AFX_VIRTUAL
- // Implementation
- public:
- virtual ~CLineChart();
- // Generated message map functions
- protected:
- //{{AFX_MSG(CLineChart)
- afx_msg void OnPaint();
- afx_msg void OnMouseMove(UINT nFlags, CPoint point);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- #endif // !defined(AFX_LINECHART_H__754AC4E3_07E2_4566_8B88_16C1ACC0BDDB__INCLUDED_)