Hi. I have a chart the obtains data via a HTTPService. The chart just gets values from a MySQL database depending on the month and year selected.
In the Flex App I have 2 dropdowns - 1 with the months and 1 with the year. What I need to do is to be able to change the year / month hit refresh and the chart repopulates with the new data. I can get the request to be put through to the server but the chart data won't change. I've included my code below: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="srv.send();"> <mx:Script> <![CDATA[ import flash.events.Event; import mx.events.DropdownEvent; import mx.controls.Alert; [Bindable] public var selected_month:String; [Bindable] public var selected_year:String; [Bindable] public var contract_id:String; ]]> </mx:Script> <mx:Style> .myBarChartStyle { fill:#CDEB8B; } </mx:Style> <mx:HTTPService id="srv" url="http://localhost/qrep/reports/ agent_yearly_performance/XML_monthly_generator.php"> <mx:request xmlns=""> <month>{month.text}</month> <year>{year.text}</year> </mx:request> </mx:HTTPService> <mx:Model id="month_source" source="http://localhost/qrep/flex/ agent_yearly_overview-debug/months.xml"/> <mx:Model id="year_source" source="http://localhost/qrep/flex/ agent_yearly_overview-debug/years.xml"/> <mx:ComboBox id="month" dataProvider="{month_source.data}" labelField="month" x="556" y="10"/> <mx:ComboBox id="year" dataProvider="{year_source.data}" labelField="year" x="672" y="10"/> <mx:Panel title="Monthly Office Overview: {month.text} - {year.text}"> <mx:BarChart color="#333333" fontSize="9" width="100%" height="100%" dataProvider="{srv.lastResult.office_monthly_dataset.office_monthly_data}" showDataTips="true"> <mx:series> <mx:BarSeries styleName="myBarChartStyle" xField="totalscore"/> </mx:series> <mx:verticalAxis> <mx:CategoryAxis categoryField="team"/> </mx:verticalAxis> </mx:BarChart> </mx:Panel> <mx:Button x="556" y="78" label="Refresh Report" id="reportCreateButton" click="month.text; year.text; Alert.show('The reporting period has been changes to ' + month.text + ' ' + year.text, 'Period Change', mx.controls.Alert.OK); srv.send();"/> </mx:Application> I am new to Flex so I would appreciate any help! Thanks. Alex --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

