Generating charts

Aug 1, 2012 at 6:55 AM

Hi folks,

  How to generate Column Clustered chart ..

am able to generate but am getting 4 columns instead of 2 columns.

the range is taking 2 values from 2 columns each

this is the code

 ExcelChart chart = xlWorkSheet.Drawings.AddChart("Chart1", eChartType.ColumnClustered);        chart.Title.Text = "Direct Expense Efficiency Ratio"; 

chart.SetPosition(2, 5, 1, 4); 

 chart.SetSize(640, 440);   

 var serie = chart.Series.Add(xlWorkSheet.Cells["C28:C29,E28:E29"], xlWorkSheet.Cells["B28:B29"]);

plz help me urgent..

Aug 1, 2012 at 7:09 AM


i found the solution 

just adding another series an able to get..

var serie = chart.Series.Add(xlWorkSheet.Cells["C28:C29], xlWorkSheet.Cells["B28:B29"]);

var serie = chart.Series.Add(xlWorkSheet.Cells["E28:E29], xlWorkSheet.Cells["B28:B29"]);//added

Aug 3, 2012 at 8:57 AM


i found another issue while generating report..

am unable to change the series color in the chart..

will u plz help me urgent...