zedgraph x轴问题
/// <summary>
/// 初始化曲线图
/// </summary>
void GetMonthPercent(ZedGraphControl zgc)
{
GraphPane myPane = zgc.GraphPane;
myPane.XAxis.Title.Text = "日期";
myPane.YAxis.Title.Text = "百分率";
myPane.XAxis.Type = ZedGraph.AxisType.Date;
myPane.XAxis.Scale.Format = "dd";
}
/// <summary>
/// 更新曲线图
/// </summary>
/// <param name="zgc"></param>
void RefreshMonthZedGraphControl(ZedGraphControl zgc, DataSet dsTemps1)
{
GraphPane myPane = zgc.GraphPane;
myPane.Title.Text = UserList.Text + "的月巡检率";
myPane.CurveList.Clear();
PointPairList pl = new PointPairList();
LineItem li;
for (int x = 1; x < 31; x++)
{
try
{
string st = dsTemps1.Tables[0].Rows[x - 1][1].ToString();
double y = double.Parse(dsTemps1.Tables[0].Rows[x - 1][1].ToString());
pl.Add(x, y*100);
}
catch
{
pl.Add(x, 0);
}
}
li = zgc.GraphPane.AddCurve("完成率", pl, Color.Red, SymbolType.None);
zgc.AxisChange();
zgc.Refresh();
}

我怎么设置成从1号开始呢?
还有一个问题就是对着控件右键=》恢复默认大小会变成这样

...全文
相关推荐
C# 使用ZedGraph制作动态更新的统计图 超级强大
C# 使用ZedGraph制作动态更新的统计图 超级强大,能生成统计图,折线图,功能和效率超级强大,分享给大家。用法也超级简单,不用必悔。
ZedGraph曲线图实现X轴与Y轴可拖动,并且对应曲线也一起移动
场景 使用ZedGraph时,如果设置多条Y轴的情况下就会出现入戏情况。多条Y轴混在一起,影响查看效果。 上面图中有三个Y轴变量,电压、电流、容量。这三种颜色的曲线混在一起,影响观看,如果能实现可以用鼠标拖动坐标轴 那么对应的曲线能随着移动,进而实现分离的效果。 具体效果如下 注: 博客主页:https://blog.csdn.net/badao_liumang_q...
ZedGraph使用说明,自己在网络上收集整理的,功能不错
ZedGraph使用说明,自己在网络上收集整理的,功能不错,可以画点、线、棒、饼图。功能强大,实时变化。 免费控件+使用说明
ZedGraph控件详解以及DEMO案例
一个详细的DEMO案例和ZedGraph的word详解。
VS非常好用的绘图插件zedgraph及使用教程
VS非常好用的绘图插件zedgraph及使用教程,非常实用


