Hey guys, 

I'm trying to change the x-axis of a line chart at
runtime and I was wondering if anybody out there has
any information on how you would go about doing it. So
what I'm doing is that I have a pop up window that
shows a graph.  The numbers are pretty much the same
across all of the graphs, but in one, the dataset over
a much smaller data sample.  So for example most
graphs numbers range from 0-100 but on one, the
numbers are between 99.90 and 100.  I'd like to change
the min and maximum on the vertical axis at run time
depending on what chart was selected. does anyone know
of an easy way to do this?

thanks!

my code below....

// the following code doesn't work... 

if (String(trendType) == "ACHIEVE")  {
mychart.verticalAxis.LinearAxis.minimum = 99.90;
mychart.verticalAxis.LinearAxis.maximum = 100;
mychart.verticalAxis.LinearAxis.baseAtZero = false;
} else {
mychart.verticalAxis.LinearAxis.baseAtZero = true;
}                               }

// below is the line chart...

        <mx:LineChart id="mychart"
dataProvider="{arrNumbers}" showDataTips="true"
width="100%" height="100%">

        <mx:horizontalAxis>
            <mx:CategoryAxis
dataProvider="{arrNumbers}"
categoryField="dateDisplay"/>
        </mx:horizontalAxis>
                 <mx:verticalAxis>
            <mx:LinearAxis autoAdjust="true"/>
        </mx:verticalAxis>
        <mx:series>
            <mx:Array>
                <mx:LineSeries yField="targetCol"
name="Target" form="curve"  />
                                <mx:LineSeries yField="numberCol" name="Current"
form="curve"/>
            </mx:Array>
        </mx:series>
    </mx:LineChart>
        <mx:Legend dataProvider="{mychart}"
textAlign="center" horizontalAlign="center"
direction="horizontal"/>



                
__________________________________ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

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