I am trying to plot line chart after generating excel file using Microsoft interop. Let my column A is Date, B is Rate and column C is volume and I want to print a chart between Volume and Date.
I am using this code to plot line chart.
var charts = worKsheeT.ChartObjects();
var chartObject = charts.Add(60, 10, 300, 300);
var chart = chartObject.Chart;
var range = worKsheeT.get_Range("C1", "C9");
chart.SetSourceData(range);
chart.ChartType = Microsoft.Office.Interop.Excel.XlChartType.xlLine;
But it is giving me a chart which has yAxis as Volume and xAxis is simple 1,2,3,4,5....
Thanks in Advance.
After trying a lot I got this solution