Home > OS >  C# microsoft.office.interop.excel Add Chart
C# microsoft.office.interop.excel Add Chart

Time:01-20

I have a table filtered like below. enter image description here And I add the chart beside by C# with microsoft.office.interop.excel.

But when I cancel the filter,the chart may be distorted.

enter image description here How to solve it then?

CodePudding user response:

You need to change this setting on your chart ...

Format Chart Area

... you can do this programmatically using this property on your ChartObject instance ...

chartObject.Placement = XlPlacement.xlFreeFloating;

These are the other options so it fits the bill. I tested it and it works ...

Options

  •  Tags:  
  • Related