清除或删除 zedgraph 上的所有图表
Clear or remove all chart on zedgraph
如何清除zedGraph的图表?
z1.GraphPane.CurveList.Clear();
命令只单独清除曲线。我想清除整个图表并替换为新的图表线。
你现在可能已经得到了答案,但对于其他对此主题感兴趣的人,这是我在自己的代码中所做的,我有一个清晰的方法,它有以下调用来清除我的图表,
z1.GraphPane.CurveList.Clear();
z1.GraphPane.GraphObjList.Clear();
z1.GraphPane.Title.Text = "";
z1.GraphPane.XAxis.Title = "";
z1.GraphPane.YAxis.Title = "";
z1.GraphPane.Y2Axis.Title = "";
z1.GraphPane.XAxis.Type = AxisType.Linear;
z1.GraphPane.XAxis.Scale.TextLabels = null;
z1.RestoreScale(z1.GraphPane);
z1.AxisChange();
z1.Invalidate();
如何清除zedGraph的图表?
z1.GraphPane.CurveList.Clear();
命令只单独清除曲线。我想清除整个图表并替换为新的图表线。
你现在可能已经得到了答案,但对于其他对此主题感兴趣的人,这是我在自己的代码中所做的,我有一个清晰的方法,它有以下调用来清除我的图表,
z1.GraphPane.CurveList.Clear();
z1.GraphPane.GraphObjList.Clear();
z1.GraphPane.Title.Text = "";
z1.GraphPane.XAxis.Title = "";
z1.GraphPane.YAxis.Title = "";
z1.GraphPane.Y2Axis.Title = "";
z1.GraphPane.XAxis.Type = AxisType.Linear;
z1.GraphPane.XAxis.Scale.TextLabels = null;
z1.RestoreScale(z1.GraphPane);
z1.AxisChange();
z1.Invalidate();