0

I add More than One Pie Chart in my Spreadsheet Gear. Pie Chart is dynamic Depending on Groups. Each Group has independent Pie Chart Depending on their dynamic Range. All this is Working fine for me Even Generating independent Pie Charts but in same Location. I wanted to display Pie Charts in different Location in Spreadsheet.

How to do this?

Jankya
  • 966
  • 2
  • 12
  • 34

1 Answers1

0

If you are creating charts with SpreadsheetGear, then you are using the IWorksheet.Shapes.AddChart(double left, double top, double width, double height) method. You should be able to control the location as size of the new chart with the specified parameters.

If you need to reposition or resize an already-existing chart, you'll need to set its IShape.Top/Left/Width/Height properties. You can access an IShape object via the IWorksheet.Shapes collection. Example:

// Position top edge of chart 50 points from the top end of the worksheet
worksheet.Shapes["Chart 1"].Top = 50;
// Position left edge of chart 100 points from the left end of the worksheet
worksheet.Shapes["Chart 1"].Left = 100;

The IWorksheetWindowInfo interface has a couple methods that can help you convert zero-based row offsets to Point-based coordinates, which are the units used for the above size and position properties. See RowToPoints(...) and ColumnToPoints(...) for more information on these.

Tim Andersen
  • 3,014
  • 1
  • 15
  • 11
  • I done this problem. Thanks For your Answer. I have add more than One pie chart in one Sheet by manipulating its location adding some values in Top/Left/Width/Height. – Jankya Sep 09 '14 at 01:43