用ZedGraph画图的时候,我的X坐标为HH:mm:ss格式,但目前X轴全部显示的00:00:00。X轴这样定义的 myPane.XAxis.Scale.Format = "HH:mm:ss";//横轴格式
myPane.XAxis.Type = AxisType.Date;
string[] labels = new string[dt.Rows.Count];
for(int i=0;i <dt.Rows.Count;i++)
{
lables[i] = Convert.ToDateTime(dt.Rows[i]["RecTime"]).ToString("HH:mm:ss");
}
myPane.XAxis.Scale.TextLabels = labels;
myPane.XAxis.Type = AxisType.Date;
string[] labels = new string[dt.Rows.Count];
for(int i=0;i <dt.Rows.Count;i++)
{
lables[i] = Convert.ToDateTime(dt.Rows[i]["RecTime"]).ToString("HH:mm:ss");
}
myPane.XAxis.Scale.TextLabels = labels;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货