From your description, it sounds like it should be working.  But I'd need a working sample to really see if it's a flex bug or problem in your code. Can you strip it down to a barebones example of the problem? (esp. that doesn't require a server).
 
Thanks,
Ely.

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sp0rarb3jd3r
Sent: Thursday, June 08, 2006 7:01 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] trouble with second axis in linechart (Scaling capabilities)

i am having trouble getting the second axis in my chart to update.
i am parsing xml-data into a chart.
the client needs more than one feed displayed, so I supply a combobox.
but when i switch from xml with larger numbers to an xml-feed with a
smaller, the second axis retains it's scale.
where as the first adopts beautifully to similar changes.
example xml_1: (2,100),(3,250),(4,900)
xml_2: (2,100000),(3,105005),(4,231111)
switch first from xml_1 to xml_2 gives an okay scale.
from xml_2 back to xml_1 the second axis retains it's scale.

why is this a problem. because with that scale the xml_1 line then
becomes an almost straight line.

belows's the code i am using. (abbreviated - but just to give an
_expression_)ยด
hope somebody can help me out.
but this seems like a bug to me.

<mx:LineChart id="linechart" y="28" paddingLeft="5" height="190"
width="{linWidth}" addingRight="5" dataProvider="{goalArr}"
secondDataProvider="{goalArr}" showDataTips="true"
dataTipFunction="daTip" styleName="shd">
<mx:seriesFilters>
<mx:Array/>
</mx:seriesFilters>
<mx:horizontalAxis>
<mx:CategoryAxis id="axis" categoryField="time"/>
</mx:horizontalAxis>
<mx:series>
<mx:Array>
<mx:LineSeries name="gh" styleName="shd" id="linie1" xField="time"
yField="achieved" displayName="Achieved"
lineSegmentRenderer="mx.charts.renderers.LineRenderer"><mx:lineStroke>
<mx:Stroke color="#669933" weight="2"/>
</mx:lineStroke>
</mx:LineSeries>
</mx:Array>
</mx:series>
<mx:secondSeries>
<mx:Array>

<mx:LineSeries id="linie2" xField="time"
yField="goal" form="segment"
lineSegmentRenderer="mx.charts.renderers.LineRenderer"
displayName="Goal" styleName="shd"><mx:lineStroke>
<mx:Stroke color="#63c007" weight="2"/>
</mx:lineStroke>
</mx:LineSeries>

<mx:PlotSeries interactive="false"
creationComplete="not(0x87f326,0xf38726,0x2687f3);" id="plots"
name="changes" dataProvider="{annoArr}"
itemRenderer="Renderers.FlagRenderer" xField="time" yField="goal"/>
</mx:Array>
</mx:secondSeries>
</mx:LineChart>
<mx:Script>
[Bindable]
private var cards:Array = [ {label:"Clicks vs. Total Conversions",
where:"testgraph.xml"}, {label:"Clicks vs. Page Views",
where:"testgraph2.xml"}, {label:"Clicks vs. Conversion Rate",
where:"testgraph3.xml"},{label:"Clicks vs. Profit",
where:"testgraph4.xml"} ];
public function comboCha(ev:flash.events.Event):void{
rq.url="">selectedItem.where;
ld.load(rq);
linechart.dataProvider=goalArr;
axis.dataProvider=goalArr;
plots.dataProvider=annoArr;

}
</mx:Script>
<mx:ComboBox id="combo" dataProvider="{cards}" width="200"
x="{linWidth-220}" change="comboCha(event);" />

__._,_.___

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




__,_._,___

Reply via email to