diff --git a/js/app/views/CatalogVisuHistogram.js b/js/app/views/CatalogVisuHistogram.js index 8d6cdf6..f588df7 100644 --- a/js/app/views/CatalogVisuHistogram.js +++ b/js/app/views/CatalogVisuHistogram.js @@ -33,7 +33,7 @@ Ext.define('amdaUI.CatalogVisuHistogram', { } } else { - myDesktopApp.errorMsg('Missing parameter selection'); + //myDesktopApp.errorMsg('Missing parameter selection'); return null; } @@ -93,7 +93,13 @@ Ext.define('amdaUI.CatalogVisuHistogram', { queryMode: 'local', displayField: 'name', valueField: 'id', - id: 'visu-histo-param' + id: 'visu-histo-param', + listeners:{ + change:function(){ + this.visuUI.plotChart(); + }, + scope: this + } }; var checkbox={ xtype: 'fieldcontainer', @@ -168,7 +174,13 @@ Ext.define('amdaUI.CatalogVisuHistogram', { { xtype: 'textfield', fieldLabel: 'Title', - id: 'visu-histo-title' + id: 'visu-histo-title', + listeners: { + change: function(){ + this.visuUI.plotChart(); + }, + scope: this + } } ] }; diff --git a/js/app/views/CatalogVisuScatter.js b/js/app/views/CatalogVisuScatter.js index 68e4640..23ed5ae 100644 --- a/js/app/views/CatalogVisuScatter.js +++ b/js/app/views/CatalogVisuScatter.js @@ -26,12 +26,12 @@ Ext.define('amdaUI.CatalogVisuScatter', { var yAxisOpt = this.getAxisOptions('Y'); if ((!xAxisOpt.paramId) || (xAxisOpt.paramId == '')) { - myDesktopApp.errorMsg('Missing parameter selection for X axis'); + //myDesktopApp.errorMsg('Missing parameter selection for X axis'); return null; } if ((!yAxisOpt.paramId) || (yAxisOpt.paramId == '')) { - myDesktopApp.errorMsg('Missing parameter selection for Y axis'); + //myDesktopApp.errorMsg('Missing parameter selection for Y axis'); return null; } var x=[]; @@ -111,7 +111,13 @@ Ext.define('amdaUI.CatalogVisuScatter', { displayField: 'name', valueField: 'id', axisIndex: axisIndex, - id: 'visu-scatter-' + axisName + '-param' + id: 'visu-scatter-' + axisName + '-param', + listeners:{ + change:function(){ + this.visuUI.plotChart(); + }, + scope: this + } }; var comboRangeConfig = { @@ -157,7 +163,13 @@ Ext.define('amdaUI.CatalogVisuScatter', { hideTrigger: true, width: 50, disabled: true, - id: 'visu-scatter-' + axisName + '-range-min' + id: 'visu-scatter-' + axisName + '-range-min', + listeners:{ + change:function(){ + this.visuUI.plotChart(); + }, + scope: this + } }, { xtype: 'splitter' @@ -167,7 +179,13 @@ Ext.define('amdaUI.CatalogVisuScatter', { hideTrigger: true, width: 50, disabled: true, - id: 'visu-scatter-' + axisName + '-range-max' + id: 'visu-scatter-' + axisName + '-range-max', + listeners:{ + change:function(){ + this.visuUI.plotChart(); + }, + scope: this + } } ] } @@ -183,7 +201,13 @@ Ext.define('amdaUI.CatalogVisuScatter', { { xtype: 'textfield', fieldLabel: axisName + ' title', - id: 'visu-scatter-' + axisName + '-title' + id: 'visu-scatter-' + axisName + '-title', + listeners:{ + change:function(){ + this.visuUI.plotChart(); + }, + scope: this + } } ] }; @@ -203,8 +227,9 @@ Ext.define('amdaUI.CatalogVisuScatter', { scope : this, change : function(combo, newValue, oldValue) { //this.chartConfig.series[0].type = newValue; + this.visuUI.plotChart(); } - } + },scope: this }; var plotThemeComboConfig = { @@ -220,6 +245,7 @@ Ext.define('amdaUI.CatalogVisuScatter', { scope : this, change : function(combo, newValue, oldValue) { //this.chartConfig.theme = newValue; + this.visuUI.plotChart(); } } }; diff --git a/js/app/views/VisuUI.js b/js/app/views/VisuUI.js index c690279..773bb71 100644 --- a/js/app/views/VisuUI.js +++ b/js/app/views/VisuUI.js @@ -162,6 +162,10 @@ Ext.define('amdaUI.VisuUI', { config.data = allData.data; config.layout = allData.layout; } + else{ + config.data =[]; + config.layout ={}; + } var chart = Ext.getCmp('visu-chart'); if (chart){ var chartPanel = chart.up(); @@ -197,7 +201,7 @@ Ext.define('amdaUI.VisuUI', { items: [ tabContent ], - layout: 'fit' + layout: 'fit', }); me.visuTabContents.push(tabContent); if (isFirst) { @@ -258,7 +262,13 @@ Ext.define('amdaUI.VisuUI', { region: 'west', width: 250, // height: 400, - id: 'visu-tabpanel' + id: 'visu-tabpanel', + listeners:{ + tabchange:function(){ + this.plotChart(); + }, + scope: this + } }, this.emptyChartConfig ] @@ -267,12 +277,6 @@ Ext.define('amdaUI.VisuUI', { fbar: [ { type: 'button', - text: 'Plot', - scope: this, - handler: this.plotChart - }, - { - type: 'button', text: 'Reset', scope: this, handler: this.reset -- libgit2 0.21.2