[flexcoders] labelFunction on BarSeries not firing
Hello all, I'm not to sure why this isn't firing. I've broke this down to the simplest of forms and even used some very basic examples to reproduce. For some reason the labelfunctiojn never gets hit, maybe I'm missing something very simple. My stacked charts and pie charts fire just fine, seems to only be the bar chart that I'm having this issue with. Any Ideas would be much appreciated. code : mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Script![CDATA[ import mx.charts.ChartItem; import mx.charts.chartClasses.Series; import mx.collections.ArrayCollection; [Bindable] public var expenses:ArrayCollection = new ArrayCollection([ {Month:Jan, Profit:2000, Expenses:1500}, {Month:Feb, Profit:1000, Expenses:200}, {Month:Mar, Profit:1500, Expenses:500} ]); private function myLabelFunction(element:ChartItem, series:Series):String { trace(should fire) var str:String = hello! return str; } ]]/mx:Script mx:BarChart id=theChart dataProvider={expenses} showDataTips=true width=780 mx:verticalAxis mx:CategoryAxis categoryField=Month / /mx:verticalAxis mx:series mx:BarSeries labelFunction=myLabelFunction yField=Month xField=Profit/ /mx:series /mx:BarChart /mx:Application Thanks in Advance! B.
RE: [flexcoders] labelFunction on BarSeries not firing
Hey Bob, Good meeting you at the AZFPUG meeting last night. Looks like labelPosition defaults to none on a BarSeries. Try setting that to something else: mx:BarSeries labelFunction=myLabelFunction labelPosition=outside yField=Month xField=Profit/ HTH, Ryan From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Bob Wohl Sent: Thursday, February 26, 2009 11:57 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] labelFunction on BarSeries not firing Hello all, I'm not to sure why this isn't firing. I've broke this down to the simplest of forms and even used some very basic examples to reproduce. For some reason the labelfunctiojn never gets hit, maybe I'm missing something very simple. My stacked charts and pie charts fire just fine, seems to only be the bar chart that I'm having this issue with. Any Ideas would be much appreciated. code : mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Script![CDATA[ import mx.charts.ChartItem; import mx.charts.chartClasses.Series; import mx.collections.ArrayCollection; [Bindable] public var expenses:ArrayCollection = new ArrayCollection([ {Month:Jan, Profit:2000, Expenses:1500}, {Month:Feb, Profit:1000, Expenses:200}, {Month:Mar, Profit:1500, Expenses:500} ]); private function myLabelFunction(element:ChartItem, series:Series):String { trace(should fire) var str:String = hello! return str; } ]]/mx:Script mx:BarChart id=theChart dataProvider={expenses} showDataTips=true width=780 mx:verticalAxis mx:CategoryAxis categoryField=Month / /mx:verticalAxis mx:series mx:BarSeries labelFunction=myLabelFunction yField=Month xField=Profit/ /mx:series /mx:BarChart /mx:Application Thanks in Advance! B. This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.
Re: [flexcoders] labelFunction on BarSeries not firing
Ah! good point, I completely overlooked that! Yes, it was good time. Nice seeing some new faces. :) Thanks Ryan! B. On Thu, Feb 26, 2009 at 12:16 PM, Ryan Graham ryan.gra...@phoenix.eduwrote: Hey Bob, Good meeting you at the AZFPUG meeting last night. Looks like labelPosition defaults to “none” on a BarSeries. Try setting that to something else: mx:BarSeries labelFunction=myLabelFunction labelPosition=outside yField=Month xField=Profit/ HTH, Ryan *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Bob Wohl *Sent:* Thursday, February 26, 2009 11:57 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] labelFunction on BarSeries not firing Hello all, I'm not to sure why this isn't firing. I've broke this down to the simplest of forms and even used some very basic examples to reproduce. For some reason the labelfunctiojn never gets hit, maybe I'm missing something very simple. My stacked charts and pie charts fire just fine, seems to only be the bar chart that I'm having this issue with. Any Ideas would be much appreciated. code : mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Script![CDATA[ import mx.charts.ChartItem; import mx.charts.chartClasses.Series; import mx.collections.ArrayCollection; [Bindable] public var expenses:ArrayCollection = new ArrayCollection([ {Month:Jan, Profit:2000, Expenses:1500}, {Month:Feb, Profit:1000, Expenses:200}, {Month:Mar, Profit:1500, Expenses:500} ]); private function myLabelFunction(element:ChartItem, series:Series):String { trace(should fire) var str:String = hello! return str; } ]]/mx:Script mx:BarChart id=theChart dataProvider={expenses} showDataTips=true width=780 mx:verticalAxis mx:CategoryAxis categoryField=Month / /mx:verticalAxis mx:series mx:BarSeries labelFunction=myLabelFunction yField=Month xField=Profit/ /mx:series /mx:BarChart /mx:Application Thanks in Advance! B. This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.