Commit 9b94f8bc69e4d85879588b26907a0888e3e79dc6
1 parent
e1e4b8ab
Exists in
master
and in
109 other branches
Add option to show 0 values as Min Values in log scale for a spectro (#6362)
Showing
2 changed files
with
10 additions
and
4 deletions
Show diff stats
js/app/models/PlotObjects/PlotSpectroObject.js
... | ... | @@ -23,8 +23,9 @@ Ext.define('amdaPlotObj.PlotSpectroObject', { |
23 | 23 | fields : [ |
24 | 24 | {name: 'spectro-yaxis', type: 'string'}, |
25 | 25 | {name: 'spectro-value-min', type: 'float', useNull:true}, |
26 | - {name: 'spectro-value-max', type: 'float', useNull:true} | |
27 | - ], | |
26 | + {name: 'spectro-value-max', type: 'float', useNull:true}, | |
27 | + {name: 'spectro-log0-as-min', type: 'boolean'} | |
28 | + ], | |
28 | 29 | |
29 | 30 | constructor: function(){ |
30 | 31 | var me = this; |
... | ... | @@ -52,6 +53,7 @@ Ext.define('amdaPlotObj.PlotSpectroObject', { |
52 | 53 | setDefaultValues: function() |
53 | 54 | { |
54 | 55 | this.set('spectro-yaxis', amdaPlotObj.PlotObjectConfig.defaultValues.spectro.yAxis); |
56 | + this.set('spectro-log0-as-min', false); | |
55 | 57 | }, |
56 | 58 | |
57 | 59 | getJsonValues : function() |
... | ... | @@ -61,7 +63,8 @@ Ext.define('amdaPlotObj.PlotSpectroObject', { |
61 | 63 | spectroValues['spectro-yaxis'] = this.get('spectro-yaxis'); |
62 | 64 | spectroValues['spectro-value-min'] = this.get('spectro-value-min'); |
63 | 65 | spectroValues['spectro-value-max'] = this.get('spectro-value-max'); |
66 | + spectroValues['spectro-log0-as-min'] = this.get('spectro-log0-as-min'); | |
64 | 67 | |
65 | 68 | return spectroValues; |
66 | 69 | } |
67 | -}); | |
68 | 70 | \ No newline at end of file |
71 | +}); | |
... | ... |
js/app/views/PlotComponents/PlotSpectroForm.js
... | ... | @@ -30,7 +30,10 @@ Ext.define('amdaPlotComp.PlotSpectroForm', { |
30 | 30 | me.object.set('spectro-yaxis', value); |
31 | 31 | me.crtTree.refresh(); |
32 | 32 | }), |
33 | - this.addStandardFieldSet('Min/Max thresholds', '', this.getValuesRangeItems()) | |
33 | + this.addStandardFieldSet('Min/Max thresholds', '', this.getValuesRangeItems()), | |
34 | + this.addStandardCheck('spectro-log0-as-min', 'Show 0 values as Min Values in log scale', function(name, value, oldValue) { | |
35 | + me.object.set('spectro-log0-as-min', value); | |
36 | + }) | |
34 | 37 | ]; |
35 | 38 | } |
36 | 39 | }); |
... | ... |