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=ev.target.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);" />
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get to your groups with one click. Know instantly when new email arrives
http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/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/