Adding notes to a graph?

Is it possible to add an "Autoshape" or "Text Box" to a graph?

I have successfully used "Shapes.addComment" to add a Comment to a data sheet.*

What would be the best practice to obtain this type of functionality?

* Note under Excel 2003 SP2 if you add more than one Comment and subsequently move both around (by dragging within Excel) it crashes Excel.

2 Replies

JC Jason Cohen December 20, 2006 04:48 PM UTC


Note that IChart permits the Shapes.addComment() method, however that invariably causes an issue!


MW Melba Winshia Syncfusion Team December 21, 2006 10:18 AM UTC

Hi Jason,

1) Currently we do not provide support to add "Autoshape" or "Text Box. So, I have created a feature request with the development team

http://www.syncfusion.com/support/features/xlsio/Default.aspx?ToDo=view&questId=1419

I will update you as soon as an estimate is available. Sorry for the inconvenience.

2) Use the following code snippets to insert comments.

[c#]

//Insert Comment.
ICommentShape shapecom = sheet[ "A1" ].AddComment();

//Format Line.
IShapeLineFormat line = sheet.Comments[ 0 ].Line;
shapecom.Text = "hello";
line = shapecom.Line;
line.Weight = 12;
line.ForeColor = Color.Magenta;
line.Style = ExcelShapeLineStyle.Line_Thin_Thick;

Here is the sample for your reference:

comment.zip


3) Could you please provide more details on how Comments are added to chart in MS Excel? This would help me in investigating further on this issue.

Please take a look and let me know if you have any other questions.

Thanks,
Melba


Loader.
Up arrow icon