ranjan_rai Posted June 23, 2009 Report Share Posted June 23, 2009 When I use attach method and specify X and Y values for a line chart the annotation does not show up. However for certain chart types(like bubble, OpenHighLowClose e.t.c) this shows up. If I specify left and Top for annotation in a Line chart, it shows up but getting the proper left and top positions are a problem. Also setting the left and top postion will not take care of setting the annotation to proper position in case the form is resized. What is the way out for positioning annotation for line chart? Quote Link to comment Share on other sites More sharing options...
TatianaG Posted June 24, 2009 Report Share Posted June 24, 2009 Bar charts only support categorical X-Axis, so regardless of your X-Values, the attachment position must be expressed as an index in the X-Axis (0 for the first point, 1 for the second, etc.). In a line chart, the X-Axis is not categorical (if X-Values are passed) and therefore the attachment position is dependent on the X-Value and not on the point index. ChartReport.Gallery = Gallery .Lines ; Annotations annots = new Annotations (); ChartReport.Extensions.Add(annots); annots.EnableUI = true ; annots.ToolBar.Visible = true ; AnnotationText text = new AnnotationText ( "Katrina" ); text.Attach(2, 10); text.Color = Color .LightBlue; text.PlotAreaOnly = true ; text.AllowMove = false ; annots.List.Add(text); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.