[flexcoders] Re: Negative plane in Column Chart
i'm expecting a stacked chart displaying all values, also negatives, but it only display fine if the values are all nagative or all positive.. --- In flexcoders@yahoogroups.com, Ely Greenfield [EMAIL PROTECTED] wrote: What would you expect this chart to look like? Ely. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of rmlsystem Sent: Tuesday, April 24, 2007 10:44 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Negative plane in Column Chart this works except for the only positive value: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical mx:Script ![CDATA[ import mx.collections.ArrayCollection; private var dp :ArrayCollection= new ArrayCollection([ {x: 1, a: 100, b: 20, c: 40}, {x: 2, a: 90, b: 30, c: 10}, {x: 3, a: -120, b: -50, c: 40}, {x: 4, a: 200, b: 100, c: 60}, {x: 5, a: 70, b: 45, c: 30}]); ]] /mx:Script mx:CartesianChart id=chart width=100% height=100% dataProvider={dp} mx:series mx:ColumnSet type=stacked mx:ColumnSeries yField=a / mx:ColumnSeries yField=b / mx:ColumnSeries yField=c / /mx:ColumnSet /mx:series mx:horizontalAxis mx:CategoryAxis categoryField=x / /mx:horizontalAxis mx:verticalAxis mx:LinearAxis autoAdjust=true baseAtZero=false minimum=-220 / /mx:verticalAxis /mx:CartesianChart /mx:Application / {x: 3, a: -120, b: -50, c: 40} in this case, c is not renderer, only if it has a negative value.. :( Any ideas? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Ely Greenfield egreenfi@ wrote: Charts don't support stacking negative values. If you need this functionality you could simulate it with individual column series with min/max fields set. You'll need to preaggregate your values into a new dataprovider. Ely.
[flexcoders] Re: Negative plane in Column Chart
I have the same problem, i'm only using a chart with ColumnSets, it always render fine except whith one negative value. I wrote this example for explain: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical mx:Script ![CDATA[ import mx.collections.ArrayCollection; private var dp :ArrayCollection= new ArrayCollection([ {x: 1, a: 100, b: 20, c: 40}, {x: 2, a: 90, b: 30, c: 10}, {x: 3, a: 120, b: -50, c: 40}, {x: 4, a: 200, b: 100, c: 60}, {x: 5, a: 70, b: 45, c: 30}]); ]] /mx:Script mx:CartesianChart id=chart width=100% height=100% dataProvider={dp} mx:series mx:ColumnSet type=stacked mx:ColumnSeries yField=a / mx:ColumnSeries yField=b / mx:ColumnSeries yField=c / /mx:ColumnSet /mx:series mx:horizontalAxis mx:CategoryAxis categoryField=x / /mx:horizontalAxis /mx:CartesianChart /mx:Application the object: {x: 3, a: 120, b: -50, c: 40} only render the a value... --- In flexcoders@yahoogroups.com, Mikhail Shevchuk [EMAIL PROTECTED] wrote: Thanks guys for your fast replies. I have no that code right now, but the problem was that: I use ColumnSet as the only element in ColumnChart and it has no yField property of course(but there are yFields in ColumnSeries in ColumnSet). I don't understand very much how this component(ColumnChart) works with it's dataProvider, because it doesn't display negative values in that situation (only ColumnSet in the ColumnChart). But when I add another (invisible) ColumnSeries with empty dataProvider in my ColumnChart, it began to display negative values for that ColumnSet. This problem description is rather messy, I am sorry :) Is there are any thoughts about such a behavior? 2007/2/22, Ely Greenfield [EMAIL PROTECTED]: Hi Mikhail. Can you be more specific about what you're looking for? In general, the charts support negative values with no problems, so maybe I'm not understanding your question. Ely. -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Mikhail Shevchuk *Sent:* Thursday, February 22, 2007 3:18 AM *To:* Flex *Subject:* [flexcoders] Negative plane in Column Chart How to implement such a thing? Simple defining negative values doesn't help. These columns just not displayed. If this is impossible within Column Chart, could you please advise me where should I look for? Thanks. -- A vivid and creative mind characterizes you. -- A vivid and creative mind characterizes you.
[flexcoders] Re: Negative plane in Column Chart
this works except for the only positive value: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical mx:Script ![CDATA[ import mx.collections.ArrayCollection; private var dp :ArrayCollection= new ArrayCollection([ {x: 1, a: 100, b: 20, c: 40}, {x: 2, a: 90, b: 30, c: 10}, {x: 3, a: -120, b: -50, c: 40}, {x: 4, a: 200, b: 100, c: 60}, {x: 5, a: 70, b: 45, c: 30}]); ]] /mx:Script mx:CartesianChart id=chart width=100% height=100% dataProvider={dp} mx:series mx:ColumnSet type=stacked mx:ColumnSeries yField=a / mx:ColumnSeries yField=b / mx:ColumnSeries yField=c / /mx:ColumnSet /mx:series mx:horizontalAxis mx:CategoryAxis categoryField=x / /mx:horizontalAxis mx:verticalAxis mx:LinearAxis autoAdjust=true baseAtZero=false minimum=-220 / /mx:verticalAxis /mx:CartesianChart /mx:Application / {x: 3, a: -120, b: -50, c: 40} in this case, c is not renderer, only if it has a negative value.. :( Any ideas? --- In flexcoders@yahoogroups.com, Ely Greenfield [EMAIL PROTECTED] wrote: Charts don't support stacking negative values. If you need this functionality you could simulate it with individual column series with min/max fields set. You'll need to preaggregate your values into a new dataprovider. Ely.
[flexcoders] Re: Custom DataGridColumn Component?
I have some problems with the component, i put it ina a datagrid and the datagrid in another component, and in the line : if(this.dataProvider[i][labelField] == parentDocument.dataProvider[parentDocument.selectedIndex][outerDocument.\ dataField]) i was trying to access to a field dataProvider but in the another component, not the datagrid, so i try to access the datagrid's dataprovider by outerDocument.owner.dataProvider and then with outerDocument.[owner].dataProvider, and the same but it doesnt work, thats very weird because in the flex debugger appears the property, so finally, se solution var to add a property to the custom component to make a reference to the datagrid: ?xml version=1.0 encoding=utf-8? mx:DataGridColumn xmlns:mx=http://www.adobe.com/2006/mxml; editorDataField=selectTest mx:ArrayCollection id=dataProviderEdit/mx:ArrayCollection !-- Dataprovider for combobox itemEditor -- mx:String id=returnField/mx:String !-- the reference -- mx:Object id=tabla / !-- Name of the data field that the combobox returns -- mx:String id=labelFieldCombo/mx:String !-- Name of the labelField for the combobox -- mx:itemEditor mx:Component mx:ComboBox dataProvider={outerDocument.dataProviderEdit} labelField={outerDocument.labelFieldCombo} creationComplete=selectThis() mx:Script ![CDATA[ import mx.collections.ArrayCollection; private function selectThis():void{ var index:int = -1; var item : Object = null; item=outerDocument.tabla.dataProvider[outerDocument.tabla.selectedIndex]\ ; for(var i:int=0;ithis.dataProvider.length;i++){ //if(this.dataProvider[i][labelField] == parentDocument.dataProvider[parentDocument.selectedIndex][outerDocument.\ dataField]){ if(this.dataProvider[i][labelField] == item[outerDocument.dataField]){ index = i; break; } } this.selectedIndex = (index == -1) ? 0 : index; } public function get selectTest():String{ return this.selectedItem[outerDocument.returnField]; } ]] /mx:Script /mx:ComboBox /mx:Component /mx:itemEditor /mx:DataGridColumn - mx:DataGrid x=10 y=10 width=380 dataProvider={dp} editable=true id=dg mx:columns ns1:DpDgc headerText=a dataField=a dataProviderEdit={dpc} returnField=data labelFieldCombo=label editable=true tabla={dg} / mx:DataGridColumn headerText=b dataField=b/ mx:DataGridColumn headerText=c dataField=c/ /mx:columns /mx:DataGrid Any suggestions?? --- In flexcoders@yahoogroups.com, Iko Knyphausen [EMAIL PROTECTED] wrote: Ok, here we go. It's a little bit of a trial and error fiddle, but this custom DataGridColum will actually accept an additional DataProvider, call an inline itemEditor, select the current datagrid cell value in the combobox upon creation, and return any desired data after a combobox selection change. Hope it helps someone... -Iko ?xml version=1.0 encoding=utf-8? mx:DataGridColumn xmlns:mx=http://www.adobe.com/2006/mxml; editorDataField=selectTest !-- Extended Properties of DataGridColumn -- mx:ArrayCollection id=dataProviderEdit/mx:ArrayCollection !-- Dataprovider for combobox itemEditor -- mx:String id=returnField/mx:String !-- Name of the data field that the combobox returns -- mx:String id=labelFieldCombo/mx:String !-- Name of the labelField for the combobox -- mx:itemEditor mx:Component mx:ComboBox dataProvider={outerDocument.dataProviderEdit} labelField={outerDocument.labelFieldCombo} creationComplete=selectThis() mx:Script ![CDATA[ private function selectThis():void { var index:int = -1; for(var i:int=0;ithis.dataProvider.length;i++) { if(this.dataProvider[i][labelField] == parentDocument.dataProvider[parentDocument.selectedIndex][outerDocument.\ data Field]) { index = i; break; } } this.selectedIndex = (index == -1) ? 0 : index; } public function get
[flexcoders] update cellrenderer on dataprovider change
I have a datagrid with a checkBox cellrenderer in a column, i can select some checkboxes if i change the dataprovider, but if i manually check one or more checkboxes they still checked. Is there a way to select the checkboxes from outside de datagrid, or refresh all cellrenderers? -- 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/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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/
[flexcoders] Re: Error Help Type 1009
if you are receiving a null, null does not have the length property, try; if((result.length)!=undefined){ userDG.dataProvider = result; } --- In flexcoders@yahoogroups.com, Jeremy Rottman [EMAIL PROTECTED] wrote: I have built a simple userManager system, that lets people search for users in the system. If there are no records returned the user is given a simple alert window that gives them the choice to add a user. If records are returned they can double click on the dg and edit the user. Right now if there are no records returned it gives the error below. It does not keep the program from working, but it is annoying, once you click contiue the alert box shows up. TypeError: Error #1009: Cannot access a property or method of a null object reference. at custom::userSearch/::SearchManager_Search_User_Result() at custom::userSearch/___Operation1_result() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEven\ tFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::di\ spatchRpcEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resu\ ltHandler() at mx.rpc::Responder/result() at mx.rpc::AsyncRequest/acknowledge() at ::DirectHTTPMessageResponder/completeHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEven\ tFunction() Here is my as code. //*USER SEARCH FUNCTIONS START* // CALL USER SEARCH METHOD private function SearchManager_Search_User(firstName, lastName){ SearchManager.Search_User(firstName, lastName) } // HANDLE USER SEARCH RESULTS private function SearchManager_Search_User_Result(result):*{ if (result.length 0){ userDG.dataProvider = result; } else{ Alert.show(No users found. Create a new one?, Program Alert, 3, this, alertClickHandler); userDG.dataProvider.removeAll(); } } // HANDLE USER SEARCH FAULTS private function SearchManager_Search_User_Fault(event:FaultEvent):void{ Alert.show(An error occured,Program Error) } // USER SEARCH HANDLER private function userSearchHandler(){ if (firstName.length 0){ SearchManager_Search_User(firstName.text,lastName.text) } else{ SearchManager_Search_User(,lastName.text) } } // EVENT HANDLER FOR ALERT SELECTED OPTION private function alertClickHandler(event:CloseEvent):void { if (event.detail==Alert.YES) showUserDetail() else return; } //*USER SEARCH FUNCTIONs END*** -- 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/