User (Legacy) Posted March 11, 2002 Report Share Posted March 11, 2002 Hi I'm using the ValueToPixel Method to find out where to draw Annotation Objects and I use a slider to switch between three different charts. All are XY charts. When the slider is changed I always first remove and then add the annotation objects again. When the program loads ChartFX for the first time ValueToPixel works fine. However, when I then change the slider ChartFX always returns wrong values using the ValueToPixel method. For example: I have 2 points in an xy-chart, each one has the axis coordinates 102, 0.45. Using the ValueToPixel method delivers: point1 (x = 20, y = 100 wrong), for point2 (x = 250, y = 30 right) - Although the points have the same values I get different coordinates. What am I doing wrong? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Software FX Posted March 11, 2002 Report Share Posted March 11, 2002 ValueToPixel needs to be called AFTER the chart has been given a size and it is shown. The most common cause for ValueToPixel to return incorrect values is that it is called before this happens. Looks like this is your case. -- FP Software FX, Inc. 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.