现在的位置: 首页 > 综合 > 正文

MsChart函数说明

2013年08月03日 ⁄ 综合 ⁄ 共 1757字 ⁄ 字号 评论关闭

MsChart函数说明:

1.     m_Chart.GetPlot().GetAxis(1,var)//获取纵轴  

2.     //设置是否支持自动标准;控件默认支持自动标准。  

3.     m_Chart.GetPlot().GetAxis().GetValuesScale().SetAuto(FALSE);  

4.     //设置最大刻度为M;  

5.     m_Chart.GetPlot().GetAxis().GetValuesScale().SetMaximum(M);  

6.     //设置最小刻度为m;  

7.     m_Chart.GetPlot().GetAxis().GetValuesScale().SetMinimum(m);  

8.     //设置轴的等分数D;  

9.     m_Chart.GetPlot().GetAxis().GetValuesScale().SetMajorDivision(D);  

10.  //设置每等分的刻度线数n;  

11.  m_Chart.GetPlot().GetAxis().GetValuesScale().SetMinorDivision(n);  

12.  b)横轴初始化属性  

13.  VARIANT var;  

14.  m_Chart.GetPlot().GetAxis(0,var)//获取横轴  

15.  其他属性设置跟纵轴相同。  

16.  1.2 数据显示  

17.  a)设置标题栏和标签  

18.  m_Chart.SetTitleText(“标题”);//设置标题栏  

19.  m_Chart.SetRowLabel((“I”);//设置第i行标签  

20.  m_Chart.SetColumnLabel((“j”);//设置第j列标签  

21.  b)行列的显示布局  

22.  MSChart的行列显示布局有其自身的特点:下面显示是一个行列4×3(矩形图),即(四行,三列)的布局示意图。  

23.  m_Chart.SetRowCount(4); //没条曲线三个四个点 (曲线图)  

24.  m_Chart.SetColumnCount(3); //设置曲线条数为三条(曲线图)  

25.  c)行列操作  

26.  // 操作行列第i行、第j  

27.  m_Chart.SetRow(i);// i  

28.  m_Chart.SetColumn(j);//j  

29.  m_Chart.SetRowLabel((“i”);//设置第i行标签  

30.  CString str”90.5”;  

31.  m_Chart.SetData((LPCTSTR(str)); //设置行列,j>的显示数据  

32.  m_Chart.Refresh();//刷新视图  

33.  d)显示方式  

34.  获取当前的显示方式:  

35.  long nType m_Chart.GetChartType()  

36.  设置显示方式:  

37.  m_Chart.SetChartType(0);//3D(三维显示  

38.  m_Chart.SetChartType(1);//2D(二维显示  

39.  m_Chart.Refresh();  

40.  其它常用组合方式为:  

41.  m_Chart.SetChartType(1|0) //2D() 

42.  m_Chart.SetChartType(0|0) //3D()  

43.  m_Chart.SetChartType(1|2) //2D线条型  

44.  m_Chart.SetChartType(0|2) //3D线条型  

45.  m_Chart.SetChartType(1|4) //2D区域型  

46.  m_Chart.SetChartType(0|4) //3D区域型  

47.  m_Chart.SetChartType(1|6) //2D阶梯型  

48.  m_Chart.SetChartType(0|6) //3D阶梯型  

49.  

抱歉!评论已关闭.