What is the value you are getting for dataToLocal - isn't it matching
your point - can you try drawing something like a circle to confirm
that?
Not sure what is the value of n, if n is very large (say 3000) then
obviously the number of pixels between 2 points which are 50 points
apart will be less, lesser the chart area, lesser will be the distance
between 2 points in pixels.

Thanks
-Sunil
 

________________________________

From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Moore, John
Sent: Wednesday, January 16, 2008 3:04 AM
To: [email protected]
Subject: [flexcomponents] dataToLocal problem



I have a custom Canvas that I want to lay over a chart and draw certain
things at the data points. Sounds simple right?

I merely pass in the data at each point and use the chart's
dataToLocal() function to get the point where the chart is?

Here's my problem: I have a line chart. The vertical axis is a linear
set of values. The horizontal axis is also linear, but merely contains
the index of each point (0-n). So I believe I should be passing data
like this: myChart.dataToLocal(2,400) to get a point that is at 400 on
the Y axis, and at the third plotted point on my chart.

What I am, getting back doesn't make sense. When I loop through each of
my data points, I get an x values that are around 6 pixels apart - even
though the data points are each around 50 points apart. I must be doing
something wrong, but I can't seem to find enough documentation to
straighten it out.

Any help is sincerely appreciated


 

Reply via email to