Another issue I encountered in my current project (ie OLE Excel Charts insertion in a Powerpoint presentation) is the following :
I wanted to set the Width of my Chart Legend to a constant, while not giving any value to its Height so that it should be automatic. This does not work : if only one of the 2 dimensions is set, the other is zero and not auto (as it is for both when none is set). Therefore, the Legend is not visible.
Please, see sample project included, with template and result presentation.
Well, I am afraid you do need to set both attributes (width + height) if you want to customize legend size. Otherwise the other attribute would be zero. For confirmation, even if you could save the excel file for the third chart, i.e…, adding a line to your code: … Book.Save(“ExcelFile.xls”) ms = Book.SaveToStream() … you can see that the legend’s height of the chart is rendered with 0 size. So, if you want to customize the legend size, kindly set both attributes for your need.
And, we will further analyze if this could be done (possible) setting only one attribute b/w the two.
We have logged your feature request into your issue tracking system with an issue id: CELLSNET-13549. We will keep you updated if there is any progress about it.
<span style=“font-size: 11pt; font-family: “Calibri”,“sans-serif”; color: rgb(31, 73, 125);”>Please simply call Chart.Calculate() if you only want to set the
Height or width of the legend box.<o:p></o:p>