InsertChart.SeriesCollection.Add(5);
InsertChart.SeriesCollection[5].DataLabelsCollection.Add();
//给定series的名字
InsertChart.SeriesCollection[5].SetData(ChartDimensionsEnum.chDimSeriesNames, (int)ChartSpecialDataSourcesEnum.chDataLiteral, GetLocalResourceObject("mets_chart_7_micturate_total_Times").ToString());//"night times"
//给定分类
InsertChart.SeriesCollection[5].SetData(ChartDimensionsEnum.chDimCategories, (int)ChartSpecialDataSourcesEnum.chDataLiteral, strXdata);
//给定值
InsertChart.SeriesCollection[5].SetData(ChartDimensionsEnum.chDimValues, (int)ChartSpecialDataSourcesEnum.chDataLiteral, strYdata1);
//输出文件
InsertChart.SeriesCollection.Add(6);
InsertChart.SeriesCollection.Add(7);
InsertChart.SeriesCollection.Add(8);
InsertChart.SeriesCollection[8].Ungroup(true);
InsertChart.SeriesCollection[7].Ungroup(true);
InsertChart.SeriesCollection[6].Ungroup(true);
InsertChart.SeriesCollection[6].DataLabelsCollection.Add();
// 给定series的名字
InsertChart.SeriesCollection[6].SetData(ChartDimensionsEnum.chDimSeriesNames, (int)ChartSpecialDataSourcesEnum.chDataLiteral, GetLocalResourceObject("mets_chart_7_micturate_night_times").ToString());//"night times"
// 给定分类
InsertChart.SeriesCollection[6].SetData(ChartDimensionsEnum.chDimCategories, (int)ChartSpecialDataSourcesEnum.chDataLiteral, strXdata);
//给定值
InsertChart.SeriesCollection[6].SetData(ChartDimensionsEnum.chDimValues, (int)ChartSpecialDataSourcesEnum.chDataLiteral, strYdata3);
InsertChart.SeriesCollection[7].DataLabelsCollection.Add();
// 给定series的名字
InsertChart.SeriesCollection[7].SetData(ChartDimensionsEnum.chDimSeriesNames, (int)ChartSpecialDataSourcesEnum.chDataLiteral, "aaa");//"night times"
// 给定分类
InsertChart.SeriesCollection[7].SetData(ChartDimensionsEnum.chDimCategories, (int)ChartSpecialDataSourcesEnum.chDataLiteral, strXdata);
//给定值
InsertChart.SeriesCollection[7].SetData(ChartDimensionsEnum.chDimValues, (int)ChartSpecialDataSourcesEnum.chDataLiteral, strYdata3);
InsertChart.SeriesCollection[8].DataLabelsCollection.Add();
// 给定series的名字
InsertChart.SeriesCollection[8].SetData(ChartDimensionsEnum.chDimSeriesNames, (int)ChartSpecialDataSourcesEnum.chDataLiteral, "aaa");//"night times"
// 给定分类
InsertChart.SeriesCollection[8].SetData(ChartDimensionsEnum.chDimCategories, (int)ChartSpecialDataSourcesEnum.chDataLiteral, strXdata);
//给定值
InsertChart.SeriesCollection[8].SetData(ChartDimensionsEnum.chDimValues, (int)ChartSpecialDataSourcesEnum.chDataLiteral, strYdata3);
InsertChart.SeriesCollection[5].Line.DashStyle = ChartLineDashStyleEnum.chLineDash;
InsertChart.SeriesCollection[6].Line.DashStyle = ChartLineDashStyleEnum.chLineDash;
InsertChart.SeriesCollection[7].Line.DashStyle = ChartLineDashStyleEnum.chLineDash;
InsertChart.SeriesCollection[8].Line.DashStyle = ChartLineDashStyleEnum.chLineDash;
InsertChart.SeriesCollection[5].Ungroup(true);
InsertChart.SeriesCollection[5].Group(InsertChart.SeriesCollection[6]);
InsertChart.SeriesCollection[5].Group(InsertChart.SeriesCollection[7]);
InsertChart.SeriesCollection[5].Group(InsertChart.SeriesCollection[8]);
Microsoft.Office.Interop.Owc11.ChAxis seAxes = InsertChart.Axes.Add(InsertChart.SeriesCollection[5].get_Scalings(ChartDimensionsEnum.chDimValues));
seAxes.Position = Microsoft.Office.Interop.Owc11.ChartAxisPositionEnum.chAxisPositionRight;
seAxes.HasMajorGridlines = false;
seAxes.Scaling.Minimum = 0;
InsertChart.Axes[2].HasTitle = true;
InsertChart.Axes[2].Title.Caption = GetLocalResourceObject("mets_chart_7_right_YAxes_Title").ToString();