I'm currently working on building a report in c# and then outputting it to word.
I've got the chart building and being populated by data however one thing I cant get my head around is how to set the chart size / height.
any help would be appreciated, spent hours on this seemingly simple task.
CODE:
Chart CashflowChart = _document.InlineShapes.AddChart(XlChartType.xlColumnClustered).Chart;
CashflowChart.ChartArea.Height = 100;
This results in the following error :
{"Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))"}
After hours of messing around and contrary to what msdn docs says you cant edit the chartarea directly, you can edit the chartobject which is the parent of the chartarea :
CashflowChart.Parent.width= 550; CashflowChart.Parent.height = 150;
User contributions licensed under CC BY-SA 3.0