Commit 3e01c3ccead8cd81d2d5f953c8098d9e3cbc32f7

Authored by Erdogan Furkan
1 parent 3e50a478

11372 - Done

generic_data/defaultValues.json
... ... @@ -129,12 +129,14 @@
129 129 },
130 130 "histogram2D":{
131 131 "histo2DFunction":"density",
  132 + "histo2DyAxis":"y-left",
132 133 "xbinnumber":100,
133 134 "ybinnumber":100,
134 135 "smoothfactor":1
135 136 },
136 137 "histogram1D":{
137 138 "histo1DFunction":"density",
  139 + "histo1DyAxis":"y-left",
138 140 "xbinnumber":100,
139 141 "histo1DStyle":"bar",
140 142 "color":"#FF0000"
... ...
generic_data/defaultValuesLinks.json
... ... @@ -231,6 +231,11 @@
231 231 "type":"combobox",
232 232 "store":"availableHistogram2DFunctions"
233 233 },
  234 + "plot.histogram2D.histo2DyAxis":
  235 + {
  236 + "type":"combobox",
  237 + "store":"availableYAxes"
  238 + },
234 239 "plot.histogram1D.histo1DFunction":
235 240 {
236 241 "type":"combobox",
... ... @@ -240,6 +245,11 @@
240 245 {
241 246 "type":"combobox",
242 247 "store":"availableHistogram1DStyles"
  248 + },
  249 + "plot.histogram1D.histo1DyAxis":
  250 + {
  251 + "type":"combobox",
  252 + "store":"availableYAxes"
243 253 },
244 254 "plot.sauvaud.yAxis":
245 255 {
... ...
js/app/models/PlotObjects/PlotHistogram1DSerieObject.js
... ... @@ -19,6 +19,7 @@ Ext.define('amdaPlotObj.PlotHistogram1DSerieObject', {
19 19 fields : [
20 20 // {name: 'serie-xaxis-param', type: 'string'},
21 21 // {name: 'serie-resampling-mode', type: 'string'},
  22 + {name: 'histo1d-yaxis', type: 'string'},
22 23 {name: 'histo1d-function', type: 'string'},
23 24 {name: 'histotype-param', type: 'string' },
24 25 {name: 'histo1d-xbinnumber', type: 'int'},
... ... @@ -35,6 +36,7 @@ Ext.define('amdaPlotObj.PlotHistogram1DSerieObject', {
35 36 {
36 37 // this.set('serie-xaxis-param', '');
37 38 // this.set('serie-resampling-mode', amdaDefaultValues.plot.serie.resamplingMode);
  39 + this.set('histo1d-yaxis', amdaDefaultValues.plot.histogram1D.histo1DyAxis);
38 40 this.set('histo1d-function', amdaDefaultValues.plot.histogram1D.histo1DFunction);
39 41 this.set('histotype-param', '');
40 42 this.set('histo1d-xbinnumber', amdaDefaultValues.plot.histogram1D.xbinnumber);
... ... @@ -49,6 +51,7 @@ Ext.define('amdaPlotObj.PlotHistogram1DSerieObject', {
49 51 var serieValues = this.callParent(arguments);
50 52 // serieValues['serie-xaxis-param'] = this.get('serie-xaxis-param');
51 53 // serieValues['serie-resampling-mode'] = this.get('serie-resampling-mode');
  54 + serieValues['histo1d-yaxis'] = this.get('histo1d-yaxis');
52 55 serieValues['histo1d-function'] = this.get('histo1d-function');
53 56 serieValues['histotype-param'] = this.get('histotype-param');
54 57 serieValues['histo1d-xbinnumber'] = this.get('histo1d-xbinnumber');
... ...
js/app/models/PlotObjects/PlotHistogram2DSerieObject.js
... ... @@ -19,6 +19,7 @@ Ext.define('amdaPlotObj.PlotHistogram2DSerieObject', {
19 19 fields : [
20 20 {name: 'serie-xaxis-param', type: 'string'},
21 21 {name: 'serie-resampling-mode', type: 'string'},
  22 + {name: 'histo2d-yaxis', type: 'string'},
22 23 {name: 'histo2d-function', type: 'string'},
23 24 {name: 'histotype-param', type: 'string' },
24 25 {name: 'histo2d-xbinnumber', type: 'int'},
... ... @@ -36,6 +37,7 @@ Ext.define('amdaPlotObj.PlotHistogram2DSerieObject', {
36 37 {
37 38 this.set('serie-xaxis-param', '');
38 39 this.set('serie-resampling-mode', amdaDefaultValues.plot.serie.resamplingMode);
  40 + this.set('histo2d-yaxis', amdaDefaultValues.plot.histogram2D.histo2DyAxis);
39 41 this.set('histo2d-function', amdaDefaultValues.plot.histogram2D.histo2DFunction);
40 42 this.set('histotype-param', '');
41 43 this.set('histo2d-xbinnumber', amdaDefaultValues.plot.histogram2D.xbinnumber);
... ... @@ -50,6 +52,7 @@ Ext.define('amdaPlotObj.PlotHistogram2DSerieObject', {
50 52 var serieValues = this.callParent(arguments);
51 53 serieValues['serie-xaxis-param'] = this.get('serie-xaxis-param');
52 54 serieValues['serie-resampling-mode'] = this.get('serie-resampling-mode');
  55 + serieValues['histo2d-yaxis'] = this.get('histo2d-yaxis');
53 56 serieValues['histo2d-function'] = this.get('histo2d-function');
54 57 serieValues['histotype-param'] = this.get('histotype-param');
55 58 serieValues['histo2d-xbinnumber'] = this.get('histo2d-xbinnumber');
... ...
js/app/views/PlotComponents/PlotHistogram1DSerieForm.js
... ... @@ -58,7 +58,8 @@ Ext.define('amdaPlotComp.PlotHistogram1DSerieForm', {
58 58 frame: true,
59 59 //bodyPadding: '5 5 5 5',
60 60 items:
61   - [{
  61 + [
  62 + {
62 63 items:[
63 64 me.addStandardFloat2('histo1d-xmin', 'X Min', -Number.MAX_VALUE, Number.MAX_VALUE, false, false, function(name, newValue, oldValue){
64 65 me.parentObject.axes().getById('xaxis_id').set('axis-range-min', newValue);
... ... @@ -79,6 +80,12 @@ Ext.define('amdaPlotComp.PlotHistogram1DSerieForm', {
79 80 var me = this;
80 81  
81 82 var histogram1DItems = [
  83 +
  84 + this.addStandardCombo('histo1d-yaxis', 'Y axis', amdaDefaultConfigs.availableYAxes, function (name, value, oldValue) {
  85 + me.object.set('histo1d-yaxis', value);
  86 + me.crtTree.refresh();
  87 + }),
  88 +
82 89 this.addStandardCombo('histo1d-style', 'Drawing Style', amdaDefaultConfigs.availableHistogram1DStyles, function(name, value, oldValue) {
83 90 me.object.set('histo1d-style', value);
84 91 }),
... ...
js/app/views/PlotComponents/PlotHistogram2DSerieForm.js
... ... @@ -95,6 +95,31 @@ Ext.define('amdaPlotComp.PlotHistogram2DSerieForm', {
95 95 me.object.set('serie-xaxis-param', value);
96 96 me.crtTree.refresh();
97 97 }),
  98 +
  99 + this.addStandardCombo('histo2d-yaxis', 'Y axis', amdaDefaultConfigs.availableYAxes, function (name, value, oldValue) {
  100 + me.object.set('histo2d-yaxis', value);
  101 + var yMinForm = me.getForm().findField('histo2d-ymin');
  102 + var yMaxForm = me.getForm().findField('histo2d-ymax');
  103 + yMaxForm.on('change', function(name, newValue, oldValue){
  104 + me.parentObject.axes().getById(value).set('axis-range-max', newValue);
  105 + if(value === 'y-left')
  106 + me.parentObject.axes().getById('y-right').set('axis-range-max','');
  107 + else if (value === 'y-right')
  108 + me.parentObject.axes().getById('y-left').set('axis-range-max','');
  109 + });
  110 + yMinForm.on('change', function(name, newValue, oldValue){
  111 + me.parentObject.axes().getById(value).set('axis-range-min', newValue);
  112 + if(value === 'y-left')
  113 + me.parentObject.axes().getById('y-right').set('axis-range-min','');
  114 + else if (value === 'y-right')
  115 + me.parentObject.axes().getById('y-left').set('axis-range-min','');
  116 + });
  117 + if(me.parentObject){
  118 + yMinForm.fireEvent('change', yMinForm, yMinForm.getValue(), yMinForm.getValue());
  119 + yMaxForm.fireEvent('change', yMaxForm, yMaxForm.getValue(), yMaxForm.getValue());
  120 + }
  121 + me.crtTree.refresh();
  122 + }),
98 123 me.getRangeForms(),
99 124 this.addStandardCombo('serie-resampling-mode', 'Reference parameter for resampling', amdaDefaultConfigs.availableResamplingModes),
100 125 this.addStandardCombo('histo2d-function', 'Function to apply', amdaDefaultConfigs.availableHistogram2DFunctions, function(name, value, oldValue) {
... ...