I have don a kind of solution to draw a box "shadowing" a future time in
chart (draws a box above the chart area presenting the future). Here you
have a part of the code doing the effect. showTime() is called in my case by
timer.

....
public function showTime(t:Date):void {
                                        
        var g:Graphics = activityChart.graphics;
        var rc:Rectangle = new
Rectangle(activityChart.computedGutters.left,
                activityChart.computedGutters.top,
                activityChart.width-activityChart.computedGutters.left-
                activityChart.computedGutters.right,
                activityChart.height-activityChart.computedGutters.top-
                activityChart.computedGutters.bottom);
                                
        var x:Number = rc.left + Math.min((t.getTime() - 
                _mindt.getTime()) / (_maxdt.getTime() - _mindt.getTime()) 
                * rc.width , rc.width); 
        // _mindt is chart's begin time, _maxdt end time.
                        
        g.clear();
        g.beginFill(0xCCFF,0.1);
        g.moveTo(x,rc.top);
        g.lineTo(rc.right,rc.top);
        g.lineTo(rc.right,rc.bottom);
        g.lineTo(x,rc.bottom);
        g.lineTo(x,rc.top);
        g.endFill();                    
}                       

        ]]>
        </mx:Script>

        <mx:HBox width="100%" height="100%">
                
                <mx:BarChart id="activityChart" width="98%" height="100%" 
                        type="overlaid" horizontalAxis="{dtAxis}" 
                        gutterLeft="50" gutterRight="0" clipContent="false" 
                        resize="manageResize(event)"
doubleClickEnabled="true">
                        
......




-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of christopherjdunn
Sent: 7. lokakuuta 2006 0:19
To: [email protected]
Subject: [flexcoders] Chart question

I'm working on a chart that spans multiple days. What I would like to
do is put a vertical line in at a particular time, like midnight. I've
looked through the docs and I'm not seeing a way to add this. Is there
an easy way to add something like this to a chart? Any help would be
great.





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links






 





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to