diff --git a/js/app/views/CatalogVisuHistogram.js b/js/app/views/CatalogVisuHistogram.js index cf5fef5..e30e922 100644 --- a/js/app/views/CatalogVisuHistogram.js +++ b/js/app/views/CatalogVisuHistogram.js @@ -60,7 +60,8 @@ Ext.define('amdaUI.CatalogVisuHistogram', { myDesktopApp.errorMsg('Not enough data or constant data'); return null; } - var isLogScale = Ext.getCmp('visu-scatter-logbox').getValue(); + var isLogScaleX = Ext.getCmp('visu-histo-logbox-X').getValue(); + var isLogScaleY = Ext.getCmp('visu-histo-logbox-Y').getValue(); var binSize = (maxValue-minValue) / (nbBinsValue); var x=[]; catalogStore.each(function (item) { @@ -79,15 +80,36 @@ Ext.define('amdaUI.CatalogVisuHistogram', { margin: {l: 60,r: 40, b: 40,t: 40,pad: 5}, yaxis: { title: Ext.getCmp('normalizedCheckbox').getValue() ? 'Frequency': 'Events', - type: isLogScale ? 'log' : null + type: isLogScaleY ? 'log' : null }, - xaxis: {title: paramOpt.title}, + xaxis: { + title: paramOpt.title, + type: isLogScaleX ? 'log' : null}, }; var result = {data:data,layout:layout} return result; }, + generateLogBox: function(axis){ + return {xtype: 'fieldcontainer', + fieldLabel: axis+' Log Scale', + defaultType: 'checkboxfield', + items: [ + { + name : 'logscale'+axis, + inputValue: false, + id : 'visu-histo-logbox-'+axis, + listeners:{ + change:function(){ + this.visuUI.plotChart(); + }, + scope: this + } + } + ],} + }, + getHistoConfig: function(parametersStore) { var paramComboConfig = { xtype: 'combo', @@ -105,24 +127,6 @@ Ext.define('amdaUI.CatalogVisuHistogram', { scope: this } }; - var logbox={ - xtype: 'fieldcontainer', - fieldLabel: 'Log Scale', - defaultType: 'checkboxfield', - items: [ - { - name : 'logscale', - inputValue: false, - id : 'visu-scatter-logbox', - listeners:{ - change:function(){ - this.visuUI.plotChart(); - }, - scope: this - } - } - ], - }; var normalizedbox={ xtype: 'fieldcontainer', fieldLabel: 'Normalized', @@ -193,7 +197,8 @@ Ext.define('amdaUI.CatalogVisuHistogram', { paramComboConfig, sliderConfig, normalizedbox, - logbox, + this.generateLogBox('X'), + this.generateLogBox('Y'), { xtype: 'textfield', fieldLabel: 'Title', -- libgit2 0.21.2