You need to sign in before continuing.

Merged
Merge Request #45 · created by Erdogan Furkan


#6899 - histogramme sur colonnes float/integer


From FER_6899 into amdadev

Merged by Benjamin Renard

2 participants

19 Sep, 2022

1 commit


js/app/views/CatalogVisuHistogram.js
  Diff comments   Edit  View file @57eb5d1
... ... @@ -33,7 +33,7 @@ Ext.define('amdaUI.CatalogVisuHistogram', {
33 33 }
34 34 }
35 35 else {
36   - myDesktopApp.errorMsg('Missing parameter selection');
  36 + //myDesktopApp.errorMsg('Missing parameter selection');
37 37 return null;
38 38 }
39 39  
... ... @@ -93,7 +93,13 @@ Ext.define('amdaUI.CatalogVisuHistogram', {
93 93 queryMode: 'local',
94 94 displayField: 'name',
95 95 valueField: 'id',
96   - id: 'visu-histo-param'
  96 + id: 'visu-histo-param',
  97 + listeners:{
  98 + change:function(){
  99 + this.visuUI.plotChart();
  100 + },
  101 + scope: this
  102 + }
97 103 };
98 104 var checkbox={
99 105 xtype: 'fieldcontainer',
... ... @@ -168,7 +174,13 @@ Ext.define('amdaUI.CatalogVisuHistogram', {
168 174 {
169 175 xtype: 'textfield',
170 176 fieldLabel: 'Title',
171   - id: 'visu-histo-title'
  177 + id: 'visu-histo-title',
  178 + listeners: {
  179 + change: function(){
  180 + this.visuUI.plotChart();
  181 + },
  182 + scope: this
  183 + }
172 184 }
173 185 ]
174 186 };
... ...
js/app/views/CatalogVisuScatter.js
  Diff comments   Edit  View file @57eb5d1
... ... @@ -26,12 +26,12 @@ Ext.define('amdaUI.CatalogVisuScatter', {
26 26 var yAxisOpt = this.getAxisOptions('Y');
27 27  
28 28 if ((!xAxisOpt.paramId) || (xAxisOpt.paramId == '')) {
29   - myDesktopApp.errorMsg('Missing parameter selection for X axis');
  29 + //myDesktopApp.errorMsg('Missing parameter selection for X axis');
30 30 return null;
31 31 }
32 32  
33 33 if ((!yAxisOpt.paramId) || (yAxisOpt.paramId == '')) {
34   - myDesktopApp.errorMsg('Missing parameter selection for Y axis');
  34 + //myDesktopApp.errorMsg('Missing parameter selection for Y axis');
35 35 return null;
36 36 }
37 37 var x=[];
... ... @@ -111,7 +111,13 @@ Ext.define('amdaUI.CatalogVisuScatter', {
111 111 displayField: 'name',
112 112 valueField: 'id',
113 113 axisIndex: axisIndex,
114   - id: 'visu-scatter-' + axisName + '-param'
  114 + id: 'visu-scatter-' + axisName + '-param',
  115 + listeners:{
  116 + change:function(){
  117 + this.visuUI.plotChart();
  118 + },
  119 + scope: this
  120 + }
115 121 };
116 122  
117 123 var comboRangeConfig = {
... ... @@ -157,7 +163,13 @@ Ext.define('amdaUI.CatalogVisuScatter', {
157 163 hideTrigger: true,
158 164 width: 50,
159 165 disabled: true,
160   - id: 'visu-scatter-' + axisName + '-range-min'
  166 + id: 'visu-scatter-' + axisName + '-range-min',
  167 + listeners:{
  168 + change:function(){
  169 + this.visuUI.plotChart();
  170 + },
  171 + scope: this
  172 + }
161 173 },
162 174 {
163 175 xtype: 'splitter'
... ... @@ -167,7 +179,13 @@ Ext.define('amdaUI.CatalogVisuScatter', {
167 179 hideTrigger: true,
168 180 width: 50,
169 181 disabled: true,
170   - id: 'visu-scatter-' + axisName + '-range-max'
  182 + id: 'visu-scatter-' + axisName + '-range-max',
  183 + listeners:{
  184 + change:function(){
  185 + this.visuUI.plotChart();
  186 + },
  187 + scope: this
  188 + }
171 189 }
172 190 ]
173 191 }
... ... @@ -183,7 +201,13 @@ Ext.define('amdaUI.CatalogVisuScatter', {
183 201 {
184 202 xtype: 'textfield',
185 203 fieldLabel: axisName + ' title',
186   - id: 'visu-scatter-' + axisName + '-title'
  204 + id: 'visu-scatter-' + axisName + '-title',
  205 + listeners:{
  206 + change:function(){
  207 + this.visuUI.plotChart();
  208 + },
  209 + scope: this
  210 + }
187 211 }
188 212 ]
189 213 };
... ... @@ -203,8 +227,9 @@ Ext.define('amdaUI.CatalogVisuScatter', {
203 227 scope : this,
204 228 change : function(combo, newValue, oldValue) {
205 229 //this.chartConfig.series[0].type = newValue;
  230 + this.visuUI.plotChart();
206 231 }
207   - }
  232 + },scope: this
208 233 };
209 234  
210 235 var plotThemeComboConfig = {
... ... @@ -220,6 +245,7 @@ Ext.define('amdaUI.CatalogVisuScatter', {
220 245 scope : this,
221 246 change : function(combo, newValue, oldValue) {
222 247 //this.chartConfig.theme = newValue;
  248 + this.visuUI.plotChart();
223 249 }
224 250 }
225 251 };
... ...
js/app/views/VisuUI.js
  Diff comments   Edit  View file @57eb5d1
... ... @@ -162,6 +162,10 @@ Ext.define('amdaUI.VisuUI', {
162 162 config.data = allData.data;
163 163 config.layout = allData.layout;
164 164 }
  165 + else{
  166 + config.data =[];
  167 + config.layout ={};
  168 + }
165 169 var chart = Ext.getCmp('visu-chart');
166 170 if (chart){
167 171 var chartPanel = chart.up();
... ... @@ -197,7 +201,7 @@ Ext.define('amdaUI.VisuUI', {
197 201 items: [
198 202 tabContent
199 203 ],
200   - layout: 'fit'
  204 + layout: 'fit',
201 205 });
202 206 me.visuTabContents.push(tabContent);
203 207 if (isFirst) {
... ... @@ -258,7 +262,13 @@ Ext.define('amdaUI.VisuUI', {
258 262 region: 'west',
259 263 width: 250,
260 264 // height: 400,
261   - id: 'visu-tabpanel'
  265 + id: 'visu-tabpanel',
  266 + listeners:{
  267 + tabchange:function(){
  268 + this.plotChart();
  269 + },
  270 + scope: this
  271 + }
262 272 },
263 273 this.emptyChartConfig
264 274 ]
... ... @@ -267,12 +277,6 @@ Ext.define('amdaUI.VisuUI', {
267 277 fbar: [
268 278 {
269 279 type: 'button',
270   - text: 'Plot',
271   - scope: this,
272   - handler: this.plotChart
273   - },
274   - {
275   - type: 'button',
276 280 text: 'Reset',
277 281 scope: this,
278 282 handler: this.reset
... ...