function getMhsAbsen(){ var ds_thnakademik2 = store_thnakademik2(); var ds_kehadiran = new Ext.data.JsonStore({ proxy: new Ext.data.HttpProxy({ url : BASE_URL + 'mahasiswa_controller/getS_kehadiranMhs', method: 'POST' }), root: 'data', totalProperty: 'results', id: 'dsid', name: 'dsid', remoteSort: true, autoLoad: true, waitMsg: 'Mengunduh..', baseParams: { nim:'-' }, fields: [{ name: "nim", mapping: "nim" }, { name: "kdprodi", mapping: "kdprodi" }, { name: "kdstsemester", mapping: "kdstsemester" }, { name: "nmstsmt", mapping: "nmstsmt" }, { name: "pkehadiran", mapping: "pkehadiran" }], listeners: { load: function(store, records, options) { // Ext.getCmp('jmlsks2').setValue(store.getAt(0)); // alert(store.getAt(0).data['kdmk']); } } }); var ds_kehadiran_semester = new Ext.data.JsonStore({ proxy: new Ext.data.HttpProxy({ url : BASE_URL + 'mahasiswa_controller/getS_stabsensiMhsSmt', method: 'POST' }), root: 'data', totalProperty: 'results', id: 'dsid', name: 'dsid', remoteSort: true, autoLoad: true, waitMsg: 'Mengunduh..', baseParams: { nim:'-', kdstsemester:'-' }, fields: [{ name: "nim", mapping: "nim" }, { name: "kdprodi", mapping: "kdprodi" }, { name: "kdstsemester", mapping: "kdstsemester" }, { name: "kdstabsensimhs", mapping: "kdstabsensimhs" }, { name: "nmstabsensimhs", mapping: "nmstabsensimhs" }, { name: "jum", mapping: "jum" }], listeners: { load: function(store, records, options) { // Ext.getCmp('jmlsks2').setValue(store.getAt(0)); // alert(store.getAt(0).data['kdmk']); } } }); //information to display in the chart var data = [['Ext JS',115000],['jQuery',250100],['Prototype',150000],['mootools',75000],['YUI',95000],['Dojo',20000],['Sizzle',15000]]; //we create the Store that will manipulate the information var store = new Ext.data.ArrayStore({ fields:[{name:'framework'},{name:'users', type:'float'}] }); store.loadData(data); // loading the information in the store var panel3 = new Ext.Panel({ title: 'Kehadiran Mahasiswa', width: 400, height: 422, layout:'fit', tbar:[{ text: "Tahun Akademik - Semester" },{ xtype: 'textfield', id: 'thnakademikabsens', name: 'thnakademikabsens', fieldLabel: '', readOnly: true, width: 150 }], items: { xtype: 'columnchart', store: ds_kehadiran, yField: 'pkehadiran', url: '../resources/js/ext/resources/charts.swf', xField: 'nmstsmt', xAxis: new Ext.chart.CategoryAxis({ title: 'Tahun Akademik - Semester', }), yAxis: new Ext.chart.NumericAxis({ title: 'Persentase Kehadiran (%)', }) } }); var panel4 = new Ext.Panel({ title: 'Kehadiran per Semester', width:400, height:422, layout:'fit', tbar:[{ xtype: 'textfield', id: 'paramnimabsen', name: 'paramnimabsen', fieldLabel: 'NIM : ', hidden: true, width: 150, validator: function(value){ var a = value; if (a) { Ext.getCmp("thnakademikabsens").setValue(KDTHNAKADEMIK +" - " + NMJNSSEMESTER); Ext.getCmp("thnakademikabsen").setValue(KDSTSEMESTER); var b = Ext.getCmp("thnakademikabsen").getValue(); ds_kehadiran.setBaseParam('nim', a); ds_kehadiran.setBaseParam('kdstsemester', KDSTSEMESTER); ds_kehadiran.load(); ds_kehadiran_semester.setBaseParam('kdstsemester', Ext.getCmp('thnakademikabsen').getValue()); ds_kehadiran_semester.setBaseParam('nim', Ext.getCmp('paramnimabsen').getValue()); ds_kehadiran_semester.load(); } } },{ text: "Tahun Akademik - Semester" },{ xtype: 'combo', id: 'thnakademikabsen', name: 'thnakademikabsen', width:150, store: ds_thnakademik2, triggerAction: 'all', editable: false, valueField: 'kdstsemester', displayField: 'nmthnakademik', forceSelection: true, submitValue: true, emptyText: 'Pilih...', hiddenName: 'h_thakademik', listeners: { select: function(c, r, i) { var a = Ext.getCmp("paramnimabsen").getValue(); var b = Ext.getCmp("thnakademikabsen").getValue(); ds_kehadiran_semester.setBaseParam('nim', a); ds_kehadiran_semester.setBaseParam('kdstsemester', b); ds_kehadiran_semester.load(); } }, typeAhead: true, mode: 'local', emptyText: 'Belum Dipilih...', selectOnFocus: true }], items: [{ xtype: 'piechart', store: ds_kehadiran_semester, dataField: 'jum', categoryField: 'nmstabsensimhs', url: '../resources/js/ext/resources/charts.swf', extraStyle: { legend: { display: 'right', padding: 5, font: { family: 'Tahoma', size: 13 } } } }] }); var fAbsenMhs = { //new Ext.form.FormPanel({ //{ xtype: 'panel', //'container', id: 'content.absen', layout: 'column', border:false, defaults: { labelWidth: 150, labelAlign: 'right' }, items: [{ columnWidth: .50, layout: 'form', border: false, items: [{ xtype: 'fieldset', layout: 'fit', items: [panel3] }] }, { columnWidth: .50, layout: 'form', border: false, items: [{ xtype: 'fieldset', layout: 'fit', items: [panel4] }] }] }; //); return fAbsenMhs; }