用CMSChart绘制XY轴曲线图坐标
2008-03-03 10:39
155 查看
觉得这个控件好复杂呢
void VIEWRESULT::DrawPicInitial() //这个函数用于重画新的图形的坐标范围
{
VARIANT var;
m_Chart.SetRowCount(limitshow);////一屏显示limitshow个数据,可设定并修改
m_Chart.SetTitleText(m_chart_title); // 设置表名字
m_Chart.SetColumnCount(1); //设置曲线条数
//设置X轴
m_Chart.GetPlot().GetAxis(0,var).GetAxisTitle().SetText(m_chart_Hzuobiao);//X轴名称
m_Chart.GetPlot().GetAxis(0,var).GetCategoryScale().SetAuto(false); // 不自动标注X轴刻度
m_Chart.GetPlot().GetAxis(0,var).GetCategoryScale().SetDivisionsPerLabel(limitshow/10);// 一共10个标注
m_Chart.GetPlot().GetAxis(0,var).GetCategoryScale().SetDivisionsPerTick(limitshow/20); // 20个刻度标线
//设置Y轴
m_Chart.GetPlot().GetAxis(1,var).GetAxisTitle().SetText(m_chart_Zzuobiao); // Y轴名称
m_Chart.GetPlot().GetAxis(1,var).GetAxisTitle().GetTextLayout().SetOrientation(0);//Y轴名称排列方式
m_Chart.GetPlot().GetAxis(1,var).GetValueScale().SetAuto(false); // 不自动标注Y轴刻度
m_Chart.GetPlot().GetAxis(1,var).GetValueScale().SetMaximum(900);//Y轴最大刻度
m_Chart.GetPlot().GetAxis(1,var).GetValueScale().SetMinimum(-900);//Y轴最小刻度
m_Chart.GetPlot().GetAxis(1,var).GetValueScale().SetMajorDivision(10); // Y轴刻度10等分
// m_Chart.GetPlot().GetAxis(1,var).GetValueScale().SetMinorDivision(200); // 每刻度一个刻度线
m_Chart.Refresh();
return;
}
void VIEWRESULT::DrawPicInitial() //这个函数用于重画新的图形的坐标范围
{
VARIANT var;
m_Chart.SetRowCount(limitshow);////一屏显示limitshow个数据,可设定并修改
m_Chart.SetTitleText(m_chart_title); // 设置表名字
m_Chart.SetColumnCount(1); //设置曲线条数
//设置X轴
m_Chart.GetPlot().GetAxis(0,var).GetAxisTitle().SetText(m_chart_Hzuobiao);//X轴名称
m_Chart.GetPlot().GetAxis(0,var).GetCategoryScale().SetAuto(false); // 不自动标注X轴刻度
m_Chart.GetPlot().GetAxis(0,var).GetCategoryScale().SetDivisionsPerLabel(limitshow/10);// 一共10个标注
m_Chart.GetPlot().GetAxis(0,var).GetCategoryScale().SetDivisionsPerTick(limitshow/20); // 20个刻度标线
//设置Y轴
m_Chart.GetPlot().GetAxis(1,var).GetAxisTitle().SetText(m_chart_Zzuobiao); // Y轴名称
m_Chart.GetPlot().GetAxis(1,var).GetAxisTitle().GetTextLayout().SetOrientation(0);//Y轴名称排列方式
m_Chart.GetPlot().GetAxis(1,var).GetValueScale().SetAuto(false); // 不自动标注Y轴刻度
m_Chart.GetPlot().GetAxis(1,var).GetValueScale().SetMaximum(900);//Y轴最大刻度
m_Chart.GetPlot().GetAxis(1,var).GetValueScale().SetMinimum(-900);//Y轴最小刻度
m_Chart.GetPlot().GetAxis(1,var).GetValueScale().SetMajorDivision(10); // Y轴刻度10等分
// m_Chart.GetPlot().GetAxis(1,var).GetValueScale().SetMinorDivision(200); // 每刻度一个刻度线
m_Chart.Refresh();
return;
}
相关文章推荐
- CMSChart实现实时曲线的绘制(实例)参考
- 初涉C#之读取txt文件并绘制坐标曲线图
- java二维坐标动态曲线图绘制
- 在VC++中用CMSChart实现实时曲线的绘制(实例)
- C#.NET常见问题(FAQ)-如何使用2D绘图控件ZedGraph绘制坐标轴和坐标曲线
- MFC 使用双缓冲技术绘制坐标曲线
- C#.NET常见问题(FAQ)-如何使用2D绘图控件ZedGraph绘制坐标轴和坐标曲线
- ArcGIS Runtime SDK for iOS(二) ---使用定时器绘制由point组成的polyLine,并显示位置坐标
- MFC中绘制动态曲线
- HTML5开发实例-使用canvas绘制曲线
- matlab求解常微分方程组/传染病模型并绘制SIR曲线
- 【转载】c++ API 在屏幕上(或窗口中)的(x,y)坐标绘制一个点
- matplotlib basemap 绘制多边形区域曲线
- 经典算法100道(1)-绘制余弦曲线
- Android 动态绘制曲线等各种图形
- MATLAB双坐标轴的绘制
- 绘制一个周期内的余弦曲线
- matlab三维散点绘制以及坐标轴的设置
- 绘制曲线图2(完善平滑移动)