Absolutely.  I have a combination line/area chart that has this 
feature.  The basic idea is to have a chart that is showing only a 
portion of the available dataset, and Christophe Coenraets has a great 
example of how to do this in his charting components explorer: 
http://flexapps.macromedia.com/flex15/chartexplorer/explorer.mxml.  
Look for "Slider selection of time axis" under Misc Techniques and 
Examples at the bottom of the tree.  From there, just add an 
HScrollBar component that controls the start and end positions of the 
HSlider.  Here are some excerpts from my code:

In ActionScript:

function rangeScroll(o: Object) : Void {
    slider.values = new Array(o.scrollPosition, o.scrollPosition + 
o.pageSize - 1);
    sliceResults();
}

and in MXML:

<mx:HScrollBar id="timescroll" minPos="0" maxPos="{scrollbarMaxPos}" 
width="100%" scroll="rangeScroll(event.target);" />

You'll probably also want to set the various page size and scroll size 
properties of the scrollbar according to your own needs.


Doug


--- In flexcoders@yahoogroups.com, "Doug Wagner" <[EMAIL PROTECTED]> wrote:
>
> Is it possible to create a chart with scrollable contents?  I have a 
> lot of data to fit along the x axis of my chart and I would like 
space 
> the points out so they are readable.  I would then like to be able 
to  
> allow the user to scroll left and right to see all the data.  Can 
this 
> be done while leaving the axis alone (ie, scroll ONLY the contents 
of 
> the chart)?  
> 
> Thanks,
> Doug
>






--
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/

<*> 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