This is what I have tried to do to have my chart show the data in the columns I have hidden:
Excel.Application oExcelApp = new Excel.Application;
Excel._Workbook oWB = oExcelApp.Workbooks.Add();
Excel._Worksheet oWS = oWB.ActiveSheet;
Excel.ChartObjects oCharts = (Excel.ChartObjects)oWS.ChartObjects();
Excel.ChartObject oChart = oCharts.Add(10, 80, 300, 250);
Excel.Chart chart = oChart.Chart;
// these three lines work
chart.HasTitle = true;
chart.ChartTitle.Text = "Chart Title";
chart.HasLegend = false;
// I get a compile error for this line
// because the HasHiddenContent property is read-only
chart.HasHiddenContent = true;
The HasHiddenContent property is the only one I can find that looks like it might be what I'm looking for, but it is read-only. Which property can I use to tell the chart to show data in hidden columns (and rows)?