|
-
Jun 9th, 2004, 05:47 PM
#1
Thread Starter
PowerPoster
Line Projection
PROBLEMS: Projecting off screen date values for charting.
BACKGROUND
I have a charting application that uses date values on the X axis.
For our purposes say dates are charted every 5 pixels.
When charting, a date group (time-N to time-N+some date) is obtained, loaded from the DB into an array and the chart is made using the array values to chart that time frame . All well and good.
The user may also draw a line on the chart. Line endpoints are snapped (correlated) to the date in order to keep the line in date position when scrolling.
If the user scrolls the chart off screen -- the line endpoint (date) is outside the array used for charting -- and the line disappears or shows up incorrectly.
The line endpoints (date,y) are stored in the DB so getting the original date is NOT a problem.
Using y = mx+b will allow a line to be projected.
QUESTION:
1. Since the array is a fixed period (say Jan 1,2004 - May 1, 2004)
and my beginning line endpoint is now (Nov 1, 2003), how do I get screen values for the array subscripts (screen x = 0, y = ?) so that this endpoint can be used to show the line on screen???
Thanks
David
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|