VS2010版本下,如何为每个Chart设置相应的series?
我的Chart是在程序中实例化的(不是在窗体中直接拖拽过来的),代码如下:
  Chart PowerChart = new Chart;
  PowerChart.Location = pt;
  PowerChart.Width = 445;
  PowerChart.Height = 172;
  Controls.Add(PowerChart);
到这里都没有错,但是当我继续写下面这行就出错了。
PowerChart.Series[0].ChartType = SeriesChartType.Line;
估计是没有为PowerChart指定Series。
想知道怎样才能为新建的Chart对象添加Series啊?
------解决方案--------------------
程序实例化 用构造函数咯 看看 行不行