Commit 13374f3f761ea568144db6ac30688e8958e8e000

Authored by Erdogan Furkan
1 parent 1fc076b5

#10584 - Done

js/app/views/CatalogVisuHistogram.js
... ... @@ -60,7 +60,7 @@ Ext.define('amdaUI.CatalogVisuHistogram', {
60 60 myDesktopApp.errorMsg('Not enough data or constant data');
61 61 return null;
62 62 }
63   -
  63 + var isLogScale = Ext.getCmp('visu-scatter-logbox').getValue();
64 64 var binSize = (maxValue-minValue) / (nbBinsValue);
65 65 var x=[];
66 66 catalogStore.each(function (item) {
... ... @@ -77,8 +77,12 @@ Ext.define('amdaUI.CatalogVisuHistogram', {
77 77 var data = [trace];
78 78 var layout = {
79 79 margin: {l: 60,r: 40, b: 40,t: 40,pad: 5},
80   - yaxis: {title: Ext.getCmp('normalizedCheckbox').getValue() ? 'Frequency': 'Events',},
81   - xaxis: {title: paramOpt.title }, };
  80 + yaxis: {
  81 + title: Ext.getCmp('normalizedCheckbox').getValue() ? 'Frequency': 'Events',
  82 + type: isLogScale ? 'log' : null
  83 + },
  84 + xaxis: {title: paramOpt.title},
  85 + };
82 86  
83 87 var result = {data:data,layout:layout}
84 88 return result;
... ... @@ -101,7 +105,25 @@ Ext.define('amdaUI.CatalogVisuHistogram', {
101 105 scope: this
102 106 }
103 107 };
104   - var checkbox={
  108 + var logbox={
  109 + xtype: 'fieldcontainer',
  110 + fieldLabel: 'Log Scale',
  111 + defaultType: 'checkboxfield',
  112 + items: [
  113 + {
  114 + name : 'logscale',
  115 + inputValue: false,
  116 + id : 'visu-scatter-logbox',
  117 + listeners:{
  118 + change:function(){
  119 + this.visuUI.plotChart();
  120 + },
  121 + scope: this
  122 + }
  123 + }
  124 + ],
  125 + };
  126 + var normalizedbox={
105 127 xtype: 'fieldcontainer',
106 128 fieldLabel: 'Normalized',
107 129 defaultType: 'checkboxfield',
... ... @@ -170,7 +192,8 @@ Ext.define('amdaUI.CatalogVisuHistogram', {
170 192 items : [
171 193 paramComboConfig,
172 194 sliderConfig,
173   - checkbox,
  195 + normalizedbox,
  196 + logbox,
174 197 {
175 198 xtype: 'textfield',
176 199 fieldLabel: 'Title',
... ...
js/app/views/CatalogVisuScatter.js
... ... @@ -55,8 +55,14 @@ Ext.define('amdaUI.CatalogVisuScatter', {
55 55  
56 56 var layout = {
57 57 margin: {l: 50,r: 40, b: 40,t: 40,pad: 5},
58   - xaxis: {title: xAxisOpt.title, range: !xAxisOpt.range ? null : [xAxisOpt.range.min,xAxisOpt.range.max]},
59   - yaxis: {title: yAxisOpt.title, range: !yAxisOpt.range ? null : [yAxisOpt.range.min,yAxisOpt.range.max]},
  58 + xaxis: {
  59 + title: xAxisOpt.title, range: !xAxisOpt.range ? null : [xAxisOpt.range.min,xAxisOpt.range.max],
  60 + type: xAxisOpt.logscale ? 'log' : null
  61 + },
  62 + yaxis: {
  63 + title: yAxisOpt.title, range: !yAxisOpt.range ? null : [yAxisOpt.range.min,yAxisOpt.range.max],
  64 + type: yAxisOpt.logscale ? 'log' : null
  65 + },
60 66 hovermode: "closest",
61 67 hoverlabel :{ font:{size:10}}
62 68 };
... ... @@ -98,6 +104,9 @@ Ext.define('amdaUI.CatalogVisuScatter', {
98 104 'max' : axisRangeMax
99 105 };
100 106 }
  107 +
  108 + opt.logscale = Ext.getCmp('visu-scatter-' + axisName + '-logbox').getValue();
  109 +
101 110 return opt;
102 111 },
103 112  
... ... @@ -144,6 +153,25 @@ Ext.define('amdaUI.CatalogVisuScatter', {
144 153 }
145 154 };
146 155  
  156 + var logbox={
  157 + xtype: 'fieldcontainer',
  158 + fieldLabel: 'Log Scale',
  159 + defaultType: 'checkboxfield',
  160 + items: [
  161 + {
  162 + name : 'logscale',
  163 + inputValue: false,
  164 + id : 'visu-scatter-' + axisName + '-logbox',
  165 + listeners:{
  166 + change:function(){
  167 + this.visuUI.plotChart();
  168 + },
  169 + scope: this
  170 + }
  171 + }
  172 + ],
  173 + };
  174 +
147 175 var axisRangeConfig = {
148 176 xtype : 'fieldcontainer',
149 177 layout: 'hbox',
... ... @@ -186,9 +214,9 @@ Ext.define('amdaUI.CatalogVisuScatter', {
186 214 },
187 215 scope: this
188 216 }
189   - }
  217 + },
190 218 ]
191   - }
  219 + },
192 220 ]
193 221 };
194 222  
... ... @@ -198,6 +226,7 @@ Ext.define('amdaUI.CatalogVisuScatter', {
198 226 items : [
199 227 paramComboConfig,
200 228 axisRangeConfig,
  229 + logbox,
201 230 {
202 231 xtype: 'textfield',
203 232 fieldLabel: axisName + ' title',
... ... @@ -207,7 +236,7 @@ Ext.define('amdaUI.CatalogVisuScatter', {
207 236 this.visuUI.plotChart();
208 237 },
209 238 scope: this
210   - }
  239 + },
211 240 }
212 241 ]
213 242 };
... ... @@ -222,7 +251,7 @@ Ext.define('amdaUI.CatalogVisuScatter', {
222 251 queryMode: 'local',
223 252 valueField: 'type',
224 253 value: 'scatter',
225   - id: 'visu-scatter-type',
  254 + id: 'visu-scatter-type',
226 255 listeners : {
227 256 scope : this,
228 257 change : function(combo, newValue, oldValue) {
... ... @@ -240,7 +269,7 @@ Ext.define('amdaUI.CatalogVisuScatter', {
240 269 queryMode: 'local',
241 270 valueField: 'type',
242 271 value: 'Blue',
243   - id: 'visu-scatter-color',
  272 + id: 'visu-scatter-color',
244 273 listeners : {
245 274 scope : this,
246 275 change : function(combo, newValue, oldValue) {
... ...