if its any use to anyone, here's my quick & dirty solution:
private function getPixelWidth(numDays:Number):Number{
var dAxis:DateTimeAxis = DateTimeAxis(horizontalAxis);
var w:Number = dataRegion.width;
var min:Date = dAxis.minimum;
var max:Date = dAxis.maximum;
var delta:Number = max.time - min.time;
var deltaDays:Number = delta / DateUtil.oneDay; // this is just the number of milliseconds in a day
var pixelsPerDay:Number = w/deltaDays;
return pixelsPerDay * numDays;
}
On 7/25/06, Paul BH <[EMAIL PROTECTED]> wrote:
from the docs, the unitSize property represents: "The width, in pixels, of a single data unit" but looking at the code for DateTimeAxis, it actually represents the number of milliseconds in a day (thats the data unit Im using). I'm sure I'm missing something here, but cn anyone point me in the direction of how I can find out how wide, in pixels, a day is represented on a given axis?
ta
PBH
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development | Computer software development | Software design and development |
Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.