我已成功使用 C++ 示例项目从我的 C++ 项目中使用 ZedGraph 绘制图形。但是,没有 C++ 的日期轴示例。
以下代码取自 http://zedgraph.org/wiki/index.php?title=Tutorial:Date_Axis_Chart_Demo中的 C# 示例。请查看我对文本的评论 //JEM// 以了解我的问题出在哪里
PointPairList list = new PointPairList();
for ( int i=0; i<36; i++ )
{
double x = (double) new XDate( 1995, 5, i+11 );
> //JEM //This line above doesn't work in
> C++.
double y = Math.Sin( (double) i * Math.PI / 15.0 );
list.Add( x, y );
}
....missing code...
// Set the XAxis to date type
myPane.XAxis.Type = AxisType.Date;
//JEM //This one also doesn't work even if I change it to the
//syntax that C++ understands, that is,
myPane->XAxis->Type = AxisType->Date;