Extjs4.2 How to implement a mouse click on a chart pop-up window to display the statistics of the specific list information

Source: Internet
Author: User

1 varPageSize = 20;//Initialize the number of data bars per page2 varWintitle = ";//Initialize Window caption3 4 /**5 * When you click on a chart, a window pops up to display the stats list information,6 * This method is shared for all charts in the project, the parameter type is a string that distinguishes which chart is called by the7  */8 functionshowDetails (type) {9     TenSetwindowtitle (type);//Set Window caption One      A     varPanel; -     if(Type.split ("_") [0] = = "Stdmngstatistics") { -         varGridstore = CreateStore ("Gridstore", type);//Get Data the Loadgridstorebyorgcodeandincludesuborgs (gridstore); -Gridstore.load (function(){ -Panel = Creategrid (Gridstore);//Create a panel -ShowWindow (panel);//Display window +         });  -     } + } A  at //Set Window caption - functionSetwindowtitle (type) { -     if(Type = = "Stdmngstatistics"){ -Wintitle = "Regulatory officer"; -     } - }         in  - //Setting Parameters to functionLoadgridstorebyorgcodeandincludesuborgs (gridstore) { +     varProxy =gridstore.getproxy (); -Proxy.setextraparam ("Orgcode", Selectedorgcode);//Regulatory Authority Code theProxy.setextraparam ("Includesuborgs", Selectedincludesuborgs);//whether to include subordinate institutions * } $ Panax Notoginseng //Get Data - functioncreatestore (storeId, type) { the     return NewExt.data.JsonStore ({ + Storeid:storeid, ARemotesort:true, the Pagesize:pagesize, + Proxy: { -Type: ' Ajax ', $Url:baseurl + '/app/report/statisticsdetails/' +encodeURI (encodeURI (type)), $ actionmethods: { -READ: ' POST ' -             }, the Reader: { -Type: ' JSON ',WuyiTotalproperty: ' Totalelements ', theRoot: ' content ' -             }, Wu extraparams:{ - limit:pagesize About             }, $Batchactions:false -         }, -Fields: [' id ', ' ehrid ', ' personname ', ' gender ', ' birthDate ', ' innercode ', ' svcflwmental ', ' svcflwcommondto ' , -' Family ', ' idNumber ', ' Hometel ', ' ehrintegrity ', ' hasasmyear ', ' hasasmolds ', ' Hasasmolda ', ' hasSvcExam1 ', ' mngorgname ' , A' dateCreated ', ' ehrdetails ', ' hasfirstsoap ', ' hasflwchronic ', ' hasasmyear ', ' svcasmolds ', ' svcchroniclist ', ' Svcchro Nic ', ' HASVSVCFLWCHRONICWF ', +' Grhealth ', ' grhighrisk ', ' grchronicdisease ', ' grold ', ' grmaternity ' , the' Grchildren ', ' grmentaldisorder ', ' grhandicapped ', ' cdhypertension ', ' cddiabetesmellitus ', -' Cdcoronarydisease ', ' cdcerebralapoplexy ', ' cdother ', ' curcontract '] $     }); the } the  the //Create a panel the functionCreategrid (gridstore) { -     varSM =NewExt.selection.RowModel (); in     returnExt.create (' Ext.grid.Panel ', { theborder:false, theXtype: ' Grid ', About Store:gridstore, theLoadmask:true,  theStriperows:true,  the viewconfig: { +Forcefit:true -         }, the listeners: {BayiItemdblclick:function(A, B, C, rowindex, e) { the E.preventdefault (); theOpenmodaldialog (baseurl+ '/app/ehr/index/' +gridstore.getat (rowindex). Get (' id '))); - gridstore.reload (); -             } the         } , the Selmodel:sm, the columns:[ the             NewExt.grid.RowNumberer ({ -Header: ' Serial number ', theWIDTH:45,//Ordinal column width theAlign: ' center '//Center Ordinal the                 }),94{text: ' name ', Dataindex: ' PersonName ', sortable:true }, the{text: ' Gender ', Dataindex: ' Gender ', Renderer:genderrenderer, maxwidth:60, sortable:true }, the{text: ' Date of birth ', Dataindex: ' BirthDate ', sortable:true }, the{text: ' Health classification ', Dataindex: ' Ehrclassify ', Renderer:ehrclassifyhealthrenderer, sortable:false},98{text: ' Crowd classification ', Dataindex: ' Ehrclassify ', Renderer:ehrclassifygrrenderer, sortable:false}, About{text: ' Chronic disease classification ', Dataindex: ' Ehrclassify ', Renderer:ehrclassifycdrenderer, sortable:false}, -{text: ' contracted ', dataindex: ' Curcontract ', maxwidth:60, Renderer:curcontractrenderer, sortable:false},101{text: ' Filing date ', Dataindex: ' dateCreated ', sortable:true },102{text: ' Completeness of file ', Dataindex: ' ehrintegrity ', Renderer:ehrintegrityrenderer, sortable:true },103{text: ' Credential type ', Dataindex: ' Ehrdetails ', Hidden:true, Renderer:idtyperenderer, sortable:false},104{text: ' ID number ', dataindex: ' IdNumber ', Hidden:true, sortable:false}, the{text: ' Internal file Number ', Dataindex: ' Innercode ', Hidden:true, sortable:true },106{text: ' Contact phone ', dataindex: ' Hometel ', Hidden:true, sortable:false},107{text: ' Regulatory body ', Dataindex: ' Mngorgname ', Hidden:true, sortable:false}108         ],109Bbar:NewExt.pagingtoolbar ({ the Store:gridstore,111DisplayInfo:true, theShowueritemsbeforedisplayinfo:true,113Displaymsg: "{0}-{1} bar total {2}", theEmptymsg: "No records are eligible" the         }) the     });117 }118 119 //Show Statistics List window - functionShowWindow (panel) {121Ext.create (' Ext.window.Window ', {122Modal:true,//You cannot manipulate non-window content after a popup window123 Title:wintitle,124Constrainheader:true,//all query statistics the dragged range of the pop-up window is limited theheight:620,126width:880,127Layout: ' Fit ', - items: [Panel]129 }). Show (); the}

Extjs4.2 How to implement a mouse click on a chart pop-up window to display the statistics of the specific list information

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.