korthmat Posted October 22, 2010 Report Share Posted October 22, 2010 I'm currently using ChartFX 7, version 7.0.2281.32010. I'm attempting to draw a short horizontal line segment with an AnnotationArrow object. Using this code: AnnotationArrow objectiveLine = new AnnotationArrow(); objectiveLine.AllowModify = false; objectiveLine.AllowMove = false; if (index != 3) objectiveLine.Border.Style = DashStyle.Dash; objectiveLine.Border.Color = OBJECTIVE_LINE_COLOR; objectiveLine.EndCap.Height = 0; objectiveLine.EndCap.Width = 0; objectiveLine.Height = 1; objectiveLine.Width = (chart.ChartAreaRectangle.Width - chart.PlotAreaMargin.Left - chart.PlotAreaMargin.Right) / 4; objectiveLine.Attach(index + 1, objective); annots.List.Add(objectiveLine); ...I get the lines I need, but they're not quite horizontal. Is there any way to get this to work? Quote Link to comment Share on other sites More sharing options...
CarlosAC Posted November 9, 2010 Report Share Posted November 9, 2010 Hi korthmat Please try the following code: AnnotationArrow arrow = new AnnotationArrow();arrow.Border.Color = Color.Red;arrow.Border.Width = 4;arrow.Color = Color.Red;arrow.Height = 0;arrow.Width = 100;arrow.Attach(2, 30);arrow.EndCap.Height = 1;arrow.EndCap.Width = 0;arrow.EndCap.Filled = false; Carlos Chaves Quote Link to comment Share on other sites More sharing options...
korthmat Posted November 10, 2010 Author Report Share Posted November 10, 2010 With a few parameter tweaks to get me back within the spec, this does indeed work! Thanks. 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.