F
Fu Ruijin
Hi,
I am using OWC10 to plot a chart from data in spreadsheet. Strangely, I
could not see any data displayed in my chart. Would anybody help me on this
issue? Thanks millions! Following is my code:
OWC10.ChartSpace cs = BuildChartSpace(GetViewLevel(doc), defectCount);
OWC10.ChChart pChart = cs.Charts[0];
OWC10.Spreadsheet spSheet = new OWC10.SpreadsheetClass();
cs.DataSource = (msdatasrc.DataSource)spSheet;
pChart.SeriesCollection.Add(0);
pChart.SeriesCollection[0].Caption = "R1"
pChart.SeriesCollection[0].SetData(OWC10.ChartDimensionsEnum.chDimCategories, (int)OWC10.ChartSpecialDataSourcesEnum.chDataBound, "$A$1:$A$3");
pChart.SeriesCollection[0].SetData(OWC10.ChartDimensionsEnum.chDimValues,
(int)OWC10.ChartSpecialDataSourcesEnum.chDataBound, "$B$1:$B$3");
pChart.SeriesCollection.Add(1);
pChart.SeriesCollection[1].Caption = "R2"
pChart.SeriesCollection[1].SetData(OWC10.ChartDimensionsEnum.chDimCategories,(int)OWC10.ChartSpecialDataSourcesEnum.chDataBound, "$A$1:$A$3");
pChart.SeriesCollection[1].SetData(OWC10.ChartDimensionsEnum.chDimValues,
(int)OWC10.ChartSpecialDataSourcesEnum.chDataBound, "$C$1:$C$3");
I am using OWC10 to plot a chart from data in spreadsheet. Strangely, I
could not see any data displayed in my chart. Would anybody help me on this
issue? Thanks millions! Following is my code:
OWC10.ChartSpace cs = BuildChartSpace(GetViewLevel(doc), defectCount);
OWC10.ChChart pChart = cs.Charts[0];
OWC10.Spreadsheet spSheet = new OWC10.SpreadsheetClass();
cs.DataSource = (msdatasrc.DataSource)spSheet;
pChart.SeriesCollection.Add(0);
pChart.SeriesCollection[0].Caption = "R1"
pChart.SeriesCollection[0].SetData(OWC10.ChartDimensionsEnum.chDimCategories, (int)OWC10.ChartSpecialDataSourcesEnum.chDataBound, "$A$1:$A$3");
pChart.SeriesCollection[0].SetData(OWC10.ChartDimensionsEnum.chDimValues,
(int)OWC10.ChartSpecialDataSourcesEnum.chDataBound, "$B$1:$B$3");
pChart.SeriesCollection.Add(1);
pChart.SeriesCollection[1].Caption = "R2"
pChart.SeriesCollection[1].SetData(OWC10.ChartDimensionsEnum.chDimCategories,(int)OWC10.ChartSpecialDataSourcesEnum.chDataBound, "$A$1:$A$3");
pChart.SeriesCollection[1].SetData(OWC10.ChartDimensionsEnum.chDimValues,
(int)OWC10.ChartSpecialDataSourcesEnum.chDataBound, "$C$1:$C$3");