根据你的工程来看,你使用了Seires的X,Y,Y1,Y2。
对于XYPlot类型的图表,只会使用到X,Y。
这点你可以参考产品文档,有说明Y1/Y2/Y3属性对线和XY-Plot图表无效:
http://www.gcpowertools.com.cn/d ... #!Documents/_76.htm
按照你的示例,如果想要画三条曲线,可以将Form_Load的代码改成如下:
- private void Form1_Load(object sender, EventArgs e)
- {
- // c1Chart1.Reset();
- this.CreateDemoData();
- this.c1Chart1.DataSource = this.data1;
- this.c1Chart1.ChartGroups[0].ChartData.SeriesList[0].X.DataField = "Axis.x";
- this.c1Chart1.ChartGroups[0].ChartData.SeriesList[0].Y.DataField = "Axis.y1";
- C1.Win.C1Chart.ChartDataSeries series = this.c1Chart1.ChartGroups[0].ChartData.SeriesList.AddNewSeries();
- series.X.DataField = "Axis.x";
- series.Y.DataField = "Axis.y2";
- series = this.c1Chart1.ChartGroups[0].ChartData.SeriesList.AddNewSeries();
- series.X.DataField = "Axis.x";
- series.Y.DataField = "Axis.y3";
- // // this.c1Chart1.ChartGroups[0].ChartData.SeriesList[1].X.DataField = "Axis.x";
- // this.c1Chart1.ChartGroups[0].ChartData.SeriesList[0].Y1.DataField = "Axis.y2";
- ////// this.c1Chart1.ChartGroups[0].ChartData.SeriesList[2].X.DataField = "Axis.x";
- //// this.c1Chart1.ChartGroups[0].ChartData.SeriesList[0].Y2.DataField = "Axis.y3";
- this.AddValueLabels();
- }
复制代码
|