Commit 13374f3f761ea568144db6ac30688e8958e8e000
1 parent
1fc076b5
Exists in
master
and in
52 other branches
#10584 - Done
Showing
2 changed files
with
64 additions
and
12 deletions
Show diff stats
js/app/views/CatalogVisuHistogram.js
@@ -60,7 +60,7 @@ Ext.define('amdaUI.CatalogVisuHistogram', { | @@ -60,7 +60,7 @@ Ext.define('amdaUI.CatalogVisuHistogram', { | ||
60 | myDesktopApp.errorMsg('Not enough data or constant data'); | 60 | myDesktopApp.errorMsg('Not enough data or constant data'); |
61 | return null; | 61 | return null; |
62 | } | 62 | } |
63 | - | 63 | + var isLogScale = Ext.getCmp('visu-scatter-logbox').getValue(); |
64 | var binSize = (maxValue-minValue) / (nbBinsValue); | 64 | var binSize = (maxValue-minValue) / (nbBinsValue); |
65 | var x=[]; | 65 | var x=[]; |
66 | catalogStore.each(function (item) { | 66 | catalogStore.each(function (item) { |
@@ -77,8 +77,12 @@ Ext.define('amdaUI.CatalogVisuHistogram', { | @@ -77,8 +77,12 @@ Ext.define('amdaUI.CatalogVisuHistogram', { | ||
77 | var data = [trace]; | 77 | var data = [trace]; |
78 | var layout = { | 78 | var layout = { |
79 | margin: {l: 60,r: 40, b: 40,t: 40,pad: 5}, | 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 | var result = {data:data,layout:layout} | 87 | var result = {data:data,layout:layout} |
84 | return result; | 88 | return result; |
@@ -101,7 +105,25 @@ Ext.define('amdaUI.CatalogVisuHistogram', { | @@ -101,7 +105,25 @@ Ext.define('amdaUI.CatalogVisuHistogram', { | ||
101 | scope: this | 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 | xtype: 'fieldcontainer', | 127 | xtype: 'fieldcontainer', |
106 | fieldLabel: 'Normalized', | 128 | fieldLabel: 'Normalized', |
107 | defaultType: 'checkboxfield', | 129 | defaultType: 'checkboxfield', |
@@ -170,7 +192,8 @@ Ext.define('amdaUI.CatalogVisuHistogram', { | @@ -170,7 +192,8 @@ Ext.define('amdaUI.CatalogVisuHistogram', { | ||
170 | items : [ | 192 | items : [ |
171 | paramComboConfig, | 193 | paramComboConfig, |
172 | sliderConfig, | 194 | sliderConfig, |
173 | - checkbox, | 195 | + normalizedbox, |
196 | + logbox, | ||
174 | { | 197 | { |
175 | xtype: 'textfield', | 198 | xtype: 'textfield', |
176 | fieldLabel: 'Title', | 199 | fieldLabel: 'Title', |
js/app/views/CatalogVisuScatter.js
@@ -55,8 +55,14 @@ Ext.define('amdaUI.CatalogVisuScatter', { | @@ -55,8 +55,14 @@ Ext.define('amdaUI.CatalogVisuScatter', { | ||
55 | 55 | ||
56 | var layout = { | 56 | var layout = { |
57 | margin: {l: 50,r: 40, b: 40,t: 40,pad: 5}, | 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 | hovermode: "closest", | 66 | hovermode: "closest", |
61 | hoverlabel :{ font:{size:10}} | 67 | hoverlabel :{ font:{size:10}} |
62 | }; | 68 | }; |
@@ -98,6 +104,9 @@ Ext.define('amdaUI.CatalogVisuScatter', { | @@ -98,6 +104,9 @@ Ext.define('amdaUI.CatalogVisuScatter', { | ||
98 | 'max' : axisRangeMax | 104 | 'max' : axisRangeMax |
99 | }; | 105 | }; |
100 | } | 106 | } |
107 | + | ||
108 | + opt.logscale = Ext.getCmp('visu-scatter-' + axisName + '-logbox').getValue(); | ||
109 | + | ||
101 | return opt; | 110 | return opt; |
102 | }, | 111 | }, |
103 | 112 | ||
@@ -144,6 +153,25 @@ Ext.define('amdaUI.CatalogVisuScatter', { | @@ -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 | var axisRangeConfig = { | 175 | var axisRangeConfig = { |
148 | xtype : 'fieldcontainer', | 176 | xtype : 'fieldcontainer', |
149 | layout: 'hbox', | 177 | layout: 'hbox', |
@@ -186,9 +214,9 @@ Ext.define('amdaUI.CatalogVisuScatter', { | @@ -186,9 +214,9 @@ Ext.define('amdaUI.CatalogVisuScatter', { | ||
186 | }, | 214 | }, |
187 | scope: this | 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,6 +226,7 @@ Ext.define('amdaUI.CatalogVisuScatter', { | ||
198 | items : [ | 226 | items : [ |
199 | paramComboConfig, | 227 | paramComboConfig, |
200 | axisRangeConfig, | 228 | axisRangeConfig, |
229 | + logbox, | ||
201 | { | 230 | { |
202 | xtype: 'textfield', | 231 | xtype: 'textfield', |
203 | fieldLabel: axisName + ' title', | 232 | fieldLabel: axisName + ' title', |
@@ -207,7 +236,7 @@ Ext.define('amdaUI.CatalogVisuScatter', { | @@ -207,7 +236,7 @@ Ext.define('amdaUI.CatalogVisuScatter', { | ||
207 | this.visuUI.plotChart(); | 236 | this.visuUI.plotChart(); |
208 | }, | 237 | }, |
209 | scope: this | 238 | scope: this |
210 | - } | 239 | + }, |
211 | } | 240 | } |
212 | ] | 241 | ] |
213 | }; | 242 | }; |
@@ -222,7 +251,7 @@ Ext.define('amdaUI.CatalogVisuScatter', { | @@ -222,7 +251,7 @@ Ext.define('amdaUI.CatalogVisuScatter', { | ||
222 | queryMode: 'local', | 251 | queryMode: 'local', |
223 | valueField: 'type', | 252 | valueField: 'type', |
224 | value: 'scatter', | 253 | value: 'scatter', |
225 | - id: 'visu-scatter-type', | 254 | + id: 'visu-scatter-type', |
226 | listeners : { | 255 | listeners : { |
227 | scope : this, | 256 | scope : this, |
228 | change : function(combo, newValue, oldValue) { | 257 | change : function(combo, newValue, oldValue) { |
@@ -240,7 +269,7 @@ Ext.define('amdaUI.CatalogVisuScatter', { | @@ -240,7 +269,7 @@ Ext.define('amdaUI.CatalogVisuScatter', { | ||
240 | queryMode: 'local', | 269 | queryMode: 'local', |
241 | valueField: 'type', | 270 | valueField: 'type', |
242 | value: 'Blue', | 271 | value: 'Blue', |
243 | - id: 'visu-scatter-color', | 272 | + id: 'visu-scatter-color', |
244 | listeners : { | 273 | listeners : { |
245 | scope : this, | 274 | scope : this, |
246 | change : function(combo, newValue, oldValue) { | 275 | change : function(combo, newValue, oldValue) { |