Doh! Ely not Eli.. sorry! By the way, by "sporatic" I mean that the events only fire if I am going one direction (left to right on the non-stacked one I believe) and I don't get them at all when entering the item from one side or the other. Only when crossing from one element to another.
sorry for leaving that bit out! Thunder --- In [email protected], "thunderstumpgesatwork" <[EMAIL PROTECTED]> wrote: > > Hi again. > > Eli I hope you're reading this! =) > > I'm getting really sporatic responses from a listener to the > ChartMouseEvent.MOUSE_OVER_DATA > > Note it wasn't this way in the alpha. Only significant differences on > my part is the use of XMLListCollecitons as data providers. > > see the sample app below. > Thanks, > Thunder > > _______________________ > > <?xml version="1.0" encoding="utf-8"?> > <mx:Application > width="100%" height="100%" > xmlns:mx="http://www.macromedia.com/2005/mxml" > xmlns:root="*"> > > <mx:ColumnChart id="mainChart" width="403" height="232" /> > <mx:Button label="Fetch" click="populateStaticChart()"/> > > <mx:Script> > <![CDATA[ > import mx.collections.ArrayCollection; > import mx.collections.XMLListCollection; > import mx.charts.series.ColumnSeries; > import mx.charts.CategoryAxis; > import mx.charts.events.ChartMouseEvent; > > public function populateStaticChart():void > { > var oData:XMLList = null; > var oXML:XML = > <data> > <row> > <Year>2005</Year> > <PageConvergenceMSMUnits>6.654</PageConvergenceMSMUnits> > <PageMultimediaMSMUnits>4.3</PageMultimediaMSMUnits> > <PageEnhancedMSMUnits>4.972</PageEnhancedMSMUnits> > <PageValueMSMUnits>6.117</PageValueMSMUnits> > </row> > </data>; > oData = oXML.row; > > var oXMLCol:XMLListCollection = new XMLListCollection(oData); > var aYears:Array = [ "2005" ]; > var aTypes:Array = [ "Enhanced", "Convergence", "Multimedia", > "Value" ]; > > // mainChart.type = "stacked"; > mainChart.addEventListener(ChartMouseEvent.MOUSE_OVER_DATA, > hoverChartData); > > // add the category axis to the chart > var hAxis:CategoryAxis = new CategoryAxis(); > > // this works! Thanks! > hAxis.categoryField = "" ; > hAxis.dataProvider = aYears; > > hAxis.name = "Year" ; > mainChart.horizontalAxis = hAxis; > > // add the series to the chart > var sa:Array = mainChart.series > for each (var sName:String in aTypes) > { > var cSeries:ColumnSeries = new ColumnSeries(); > cSeries.yField = "Page" + sName + "MSMUnits" ; > cSeries.name = sName; > cSeries.dataProvider = oXMLCol; > sa.push( cSeries ); > } > mainChart.series = sa; > } > > > public function hoverChartData(event:ChartMouseEvent):void > { > var oItem:Object = null; > oItem = event.hitData.item; > log.text += "\n" + event.hitData.element.name; > } > > > ]]> > </mx:Script> > > </mx:Application> > -- 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/

