Commit 6f8db0b81aef523346826e0fc1d6c47b4037ab31
1 parent
8da1cb76
Exists in
master
and in
10 other branches
Fix bug with histo1D preview
Showing
2 changed files
with
5 additions
and
1 deletions
Show diff stats
js/app/views/PlotComponents/plotFunction/FunctionType.js
... | ... | @@ -100,9 +100,10 @@ Ext.define('amdaPlotComp.plotFunction.FunctionType', { |
100 | 100 | var histoConfig = {}; |
101 | 101 | if (this.panelContext && this.panelContext.plotArea.axes) { |
102 | 102 | Ext.Array.each(this.panelContext.plotArea.axes, function(axis) { |
103 | - if (axis['id'] == 'y-left') { | |
103 | + if ((axis['id'] == 'y-left') || (axis['id'] == 'y-right')) { | |
104 | 104 | histoConfig['xmin'] = axis['min']; |
105 | 105 | histoConfig['xmax'] = axis['max']; |
106 | + histoConfig['yAxis'] = axis['id']; | |
106 | 107 | } |
107 | 108 | }); |
108 | 109 | } |
... | ... |
js/app/views/PlotComponents/plotFunction/Histogram.js
... | ... | @@ -7,6 +7,7 @@ Ext.define('amdaPlotComp.plotFunction.Histogram', { |
7 | 7 | binsId: 'histo1d-xbinnumber', |
8 | 8 | xMinId: "histo1d-xmin", |
9 | 9 | xMaxId: 'histo1d-xmax', |
10 | + | |
10 | 11 | |
11 | 12 | /** |
12 | 13 | * Initializes the component. |
... | ... | @@ -91,12 +92,14 @@ Ext.define('amdaPlotComp.plotFunction.Histogram', { |
91 | 92 | const xMaxField = this.query('[name=' + this.xMaxId + ']')[0]; |
92 | 93 | const xMaxValue = xMaxField.getValue(); |
93 | 94 | |
95 | + | |
94 | 96 | let out = {}; |
95 | 97 | |
96 | 98 | out[this.functionId] = densityTypeValue; |
97 | 99 | out[this.binsId] = numBinsValue; |
98 | 100 | out[this.xMinId] = xMinValue; |
99 | 101 | out[this.xMaxId] = xMaxValue; |
102 | + out['histo1d-yaxis'] = this.yAxis; | |
100 | 103 | |
101 | 104 | return out; |
102 | 105 | } |
... | ... |