Commit df00837288b0fb9dc5483fa02311ba1438f487fa

Authored by Benjamin Renard
1 parent 5a61421b

Min/max value definition

js/app/models/PlotObjects/PlotBaseSerieObject.js
... ... @@ -31,6 +31,8 @@ Ext.define('amdaPlotObj.PlotBaseSerieObject', {
31 31 {name: 'serie-symbols-size', type: 'float'},
32 32 {name: 'serie-symbols-color', type: 'string'},
33 33 {name: 'serie-colored-param', type: 'string'},
  34 + {name: 'serie-value-min', type: 'float', useNull:true},
  35 + {name: 'serie-value-max', type: 'float', useNull:true},
34 36  
35 37 //Time tick
36 38 {name: 'serie-timetick-activated', type: 'boolean'},
... ... @@ -139,6 +141,8 @@ Ext.define('amdaPlotObj.PlotBaseSerieObject', {
139 141 serieValues['serie-symbols-size'] = this.get('serie-symbols-size');
140 142 serieValues['serie-symbols-color'] = this.get('serie-symbols-color');
141 143 serieValues['serie-colored-param'] = this.get('serie-colored-param');
  144 + serieValues['serie-value-min'] = this.get('serie-value-min');
  145 + serieValues['serie-value-max'] = this.get('serie-value-max');
142 146  
143 147 serieValues['serie-timetick-activated'] = this.get('serie-timetick-activated');
144 148 serieValues['serie-timetick-type'] = this.get('serie-timetick-type');
... ...
js/app/models/PlotObjects/PlotSerieObject.js
... ... @@ -19,6 +19,8 @@ Ext.define('amdaPlotObj.PlotSerieObject', {
19 19 fields : [
20 20 //Only used for xyPlot
21 21 {name: 'serie-xaxis-param', type: 'string'},
  22 + {name: 'serie-xvalue-min', type: 'float', useNull:true},
  23 + {name: 'serie-xvalue-max', type: 'float', useNull:true},
22 24 {name: 'serie-resampling-mode', type: 'string'},
23 25  
24 26 //Only used for timePlot
... ... @@ -59,6 +61,8 @@ Ext.define('amdaPlotObj.PlotSerieObject', {
59 61 var serieValues = this.callParent(arguments);
60 62  
61 63 serieValues['serie-xaxis-param'] = this.get('serie-xaxis-param');
  64 + serieValues['serie-xvalue-min'] = this.get('serie-xvalue-min');
  65 + serieValues['serie-xvalue-max'] = this.get('serie-xvalue-max');
62 66 serieValues['serie-resampling-mode'] = this.get('serie-resampling-mode');
63 67  
64 68 serieValues['serie-errorbar-activated'] = this.get('serie-errorbar-activated');
... ...
js/app/models/PlotObjects/PlotSpectroObject.js
... ... @@ -21,7 +21,9 @@ Ext.define('amdaPlotObj.PlotSpectroObject', {
21 21 ],
22 22  
23 23 fields : [
24   - {name: 'spectro-yaxis', type: 'string'}
  24 + {name: 'spectro-yaxis', type: 'string'},
  25 + {name: 'spectro-value-min', type: 'float', useNull:true},
  26 + {name: 'spectro-value-max', type: 'float', useNull:true}
25 27 ],
26 28  
27 29 constructor: function(){
... ... @@ -48,6 +50,8 @@ Ext.define('amdaPlotObj.PlotSpectroObject', {
48 50 var spectroValues = new Object();
49 51  
50 52 spectroValues['spectro-yaxis'] = this.get('spectro-yaxis');
  53 + spectroValues['spectro-value-min'] = this.get('spectro-value-min');
  54 + spectroValues['spectro-value-max'] = this.get('spectro-value-max');
51 55  
52 56 return spectroValues;
53 57 }
... ...
js/app/views/PlotComponents/PlotBaseSerieForm.js
... ... @@ -75,6 +75,13 @@ Ext.define('amdaPlotComp.PlotBaseSerieForm', {
75 75 ];
76 76 },
77 77  
  78 + getValuesRangeItems: function() {
  79 + return [
  80 + this.addStandardFloat('serie-value-min', 'Min value', -Number.MAX_VALUE, Number.MAX_VALUE, true),
  81 + this.addStandardFloat('serie-value-max', 'Max value', -Number.MAX_VALUE, Number.MAX_VALUE, true)
  82 + ];
  83 + },
  84 +
78 85 getFormItems: function() {
79 86 var me = this;
80 87  
... ... @@ -83,6 +90,7 @@ Ext.define('amdaPlotComp.PlotBaseSerieForm', {
83 90 me.object.set('serie-yaxis', value);
84 91 me.crtTree.refresh();
85 92 }),
  93 + this.addStandardFieldSet('Y Values range', '', this.getValuesRangeItems()),
86 94 this.addStandardParamDropTarget('serie-colored-param', 'Colored Parameter'),
87 95 this.addStandardFieldSet('Lines', 'serie-lines-activated', this.addStandardLineItems('serie-lines')),
88 96 this.addStandardFieldSet('Symbols', 'serie-symbols-activated', this.addStandardSymbolsItems('serie-symbols')),
... ...
js/app/views/PlotComponents/PlotSerieForm.js
... ... @@ -15,9 +15,12 @@ Ext.define('amdaPlotComp.PlotSerieForm', {
15 15 var isScatter = (plotType == 'xyPlot');
16 16  
17 17 var xParamField = this.getForm().findField('serie-xaxis-param');
  18 + var xValueMinField = this.getForm().findField('serie-xvalue-min');
  19 + var xValueFieldSet = xValueMinField.findParentByType('fieldset');
18 20 var resamplingModeField = this.getForm().findField('serie-resampling-mode');
19 21  
20 22 xParamField.setVisible(isScatter);
  23 + xValueFieldSet.setVisible(isScatter);
21 24 resamplingModeField.setVisible(isScatter);
22 25  
23 26 var errorBarTypeField = this.getForm().findField('serie-errorbar-type');
... ... @@ -53,6 +56,13 @@ Ext.define('amdaPlotComp.PlotSerieForm', {
53 56 ];
54 57 },
55 58  
  59 + getXValuesRangeItems: function() {
  60 + return [
  61 + this.addStandardFloat('serie-xvalue-min', 'Min value', -Number.MAX_VALUE, Number.MAX_VALUE, true),
  62 + this.addStandardFloat('serie-xvalue-max', 'Max value', -Number.MAX_VALUE, Number.MAX_VALUE, true)
  63 + ];
  64 + },
  65 +
56 66 getFormItems: function() {
57 67 var me = this;
58 68  
... ... @@ -63,6 +73,7 @@ Ext.define('amdaPlotComp.PlotSerieForm', {
63 73 me.object.set('serie-xaxis-param', value);
64 74 me.crtTree.refresh();
65 75 }),
  76 + this.addStandardFieldSet('X Values range', '', this.getXValuesRangeItems()),
66 77 this.addStandardCombo('serie-resampling-mode', 'Reference parameter for resampling', amdaPlotObj.PlotObjectConfig.availableResamplingModes)
67 78 ];
68 79  
... ...
js/app/views/PlotComponents/PlotSpectroForm.js
... ... @@ -16,13 +16,21 @@ Ext.define('amdaPlotComp.PlotSpectroForm', {
16 16 this.loadRecord(this.object);
17 17 },
18 18  
  19 + getValuesRangeItems: function() {
  20 + return [
  21 + this.addStandardFloat('spectro-value-min', 'Min value', -Number.MAX_VALUE, Number.MAX_VALUE, true),
  22 + this.addStandardFloat('spectro-value-max', 'Max value', -Number.MAX_VALUE, Number.MAX_VALUE, true)
  23 + ];
  24 + },
  25 +
19 26 getFormItems: function() {
20 27 var me = this;
21 28 return [
22 29 this.addStandardCombo('spectro-yaxis', 'Y axis', amdaPlotObj.PlotObjectConfig.availableYAxes, function(name, value, oldValue) {
23 30 me.object.set('spectro-yaxis', value);
24 31 me.crtTree.refresh();
25   - })
  32 + }),
  33 + this.addStandardFieldSet('Values range', '', this.getValuesRangeItems())
26 34 ];
27 35 }
28 36 });
29 37 \ No newline at end of file
... ...