cwerle Posted April 28, 2009 Report Share Posted April 28, 2009 Hello, how can I make an AnnotationBalloon use the 2nd y-axis for positioning itself? So far, AnnotationBalloons always seem to use the 1st y-axis, and there does not seem to be an option that allows for selecting which y-axis to use. Thanks. Regards, cwerle Quote Link to comment Share on other sites More sharing options...
juanZ Posted April 28, 2009 Report Share Posted April 28, 2009 Hi, Is not just enough to add a new Y Axis, we should let the series use that new axis. When there is an annotation object on the chart, the object should adjust to the primary YAxis, in this case the new axis will be the primary Axis for series[0]. AxisY AddlAxisY = new AxisY(); AddlAxisY.TextColor = chart1.Series[0].Color; AddlAxisY.Visible = true; AddlAxisY.Position = AxisPosition.Far; AddlAxisY.ForceZero = false; chart1.AxesY.Add(AddlAxisY); chart1.Series[0].AxisY = AddlAxisY; Hope this helps. Quote Link to comment Share on other sites More sharing options...
cwerle Posted April 30, 2009 Author Report Share Posted April 30, 2009 Hi, thanks for your answer, Juan. I already have 2 y-axes in my chart and have a series using the secondary y-axis. This works fine so far. But now, I want to attach an AnnotationBalloon to the series that uses this secondary y-axis. And here comes the issue: that AnnotationBalloon seems to use the primary y-axis for aligning its position. I haven't yet found a way to make the AnnotationBalloon align its position according to the secondary y-axis. Can you confirm that AnnotationBalloons really always use the primary y-axis only? Thanks. Regards, cwerle Quote Link to comment Share on other sites More sharing options...
juanZ Posted April 30, 2009 Report Share Posted April 30, 2009 Yes, AnnotationBalloons use the primary y-axis only, thats why you need the chart1.Series[0].AxisY = AddlAxisY; Regards, 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.