Commit a8ad438a62e23f53784f1b95f481d7116546e566

Authored by Benjamin Renard
2 parents 86886da2 c4d04b8c

Merge branch 'Histo1D2D' into amdadev

generic_data/defaultValues.json
@@ -136,6 +136,7 @@ @@ -136,6 +136,7 @@
136 "histogram1D":{ 136 "histogram1D":{
137 "histo1DFunction":"density", 137 "histo1DFunction":"density",
138 "xbinnumber":100, 138 "xbinnumber":100,
  139 + "histo1DStyle":"bar",
139 "color":"#FF0000" 140 "color":"#FF0000"
140 }, 141 },
141 "sauvaud":{ 142 "sauvaud":{
generic_data/defaultValuesConfig.json
@@ -267,6 +267,11 @@ @@ -267,6 +267,11 @@
267 { "key": "normdensity", "value": "Normalised Density" } 267 { "key": "normdensity", "value": "Normalised Density" }
268 ], 268 ],
269 269
  270 + "availableHistogram1DStyles": [
  271 + { "key": "bar", "value": "Bar-like" },
  272 + { "key": "stares", "value": "Stare-like" }
  273 + ],
  274 +
270 "availableDimsOnXAxis": [ 275 "availableDimsOnXAxis": [
271 { "key": "0", "value": "First dimension" }, 276 { "key": "0", "value": "First dimension" },
272 { "key": "1", "value": "Second dimension" } 277 { "key": "1", "value": "Second dimension" }
generic_data/defaultValuesLinks.json
@@ -236,6 +236,11 @@ @@ -236,6 +236,11 @@
236 "type":"combobox", 236 "type":"combobox",
237 "store":"availableHistogram1DFunctions" 237 "store":"availableHistogram1DFunctions"
238 }, 238 },
  239 + "plot.histogram1D.histo1DStyle":
  240 + {
  241 + "type":"combobox",
  242 + "store":"availableHistogram1DStyles"
  243 + },
239 "plot.sauvaud.yAxis": 244 "plot.sauvaud.yAxis":
240 { 245 {
241 "type":"combobox", 246 "type":"combobox",
js/app/models/PlotObjects/PlotHistogram1DSerieObject.js
@@ -21,6 +21,7 @@ Ext.define('amdaPlotObj.PlotHistogram1DSerieObject', { @@ -21,6 +21,7 @@ Ext.define('amdaPlotObj.PlotHistogram1DSerieObject', {
21 // {name: 'serie-resampling-mode', type: 'string'}, 21 // {name: 'serie-resampling-mode', type: 'string'},
22 {name: 'histo1d-function', type: 'string'}, 22 {name: 'histo1d-function', type: 'string'},
23 {name: 'histo1d-xbinnumber', type: 'int'}, 23 {name: 'histo1d-xbinnumber', type: 'int'},
  24 + {name: 'histo1d-style', type: 'string'},
24 {name: 'histo1d-color', type: 'string', defaultValue: "none"} 25 {name: 'histo1d-color', type: 'string', defaultValue: "none"}
25 ], 26 ],
26 27
@@ -36,6 +37,7 @@ Ext.define('amdaPlotObj.PlotHistogram1DSerieObject', { @@ -36,6 +37,7 @@ Ext.define('amdaPlotObj.PlotHistogram1DSerieObject', {
36 this.set('histo1d-function', amdaDefaultValues.plot.histogram1D.histo1DFunction); 37 this.set('histo1d-function', amdaDefaultValues.plot.histogram1D.histo1DFunction);
37 // this.set('histotype-param', ''); 38 // this.set('histotype-param', '');
38 this.set('histo1d-xbinnumber', amdaDefaultValues.plot.histogram1D.xbinnumber); 39 this.set('histo1d-xbinnumber', amdaDefaultValues.plot.histogram1D.xbinnumber);
  40 + this.set('histo1d-style', amdaDefaultValues.plot.histogram1D.histo1DStyle);
39 this.set('histo1d-color', amdaDefaultValues.plot.histogram1D.color); 41 this.set('histo1d-color', amdaDefaultValues.plot.histogram1D.color);
40 42
41 this.callParent(arguments); 43 this.callParent(arguments);
@@ -49,6 +51,7 @@ Ext.define('amdaPlotObj.PlotHistogram1DSerieObject', { @@ -49,6 +51,7 @@ Ext.define('amdaPlotObj.PlotHistogram1DSerieObject', {
49 serieValues['histo1d-function'] = this.get('histo1d-function'); 51 serieValues['histo1d-function'] = this.get('histo1d-function');
50 // serieValues['histotype-param'] = this.get('histotype-param'); 52 // serieValues['histotype-param'] = this.get('histotype-param');
51 serieValues['histo1d-xbinnumber'] = this.get('histo1d-xbinnumber'); 53 serieValues['histo1d-xbinnumber'] = this.get('histo1d-xbinnumber');
  54 + serieValues['histo1d-style'] = this.get('histo1d-style');
52 serieValues['histo1d-color'] = this.get('histo1d-color'); 55 serieValues['histo1d-color'] = this.get('histo1d-color');
53 // serieValues['histo1D-ybinnumber'] = this.get('histo1D-ybinnumber'); 56 // serieValues['histo1D-ybinnumber'] = this.get('histo1D-ybinnumber');
54 // serieValues['histo1D-smoothfactor'] = this.get('histo1D-smoothfactor'); 57 // serieValues['histo1D-smoothfactor'] = this.get('histo1D-smoothfactor');
js/app/views/PlotComponents/PlotHistogram1DSerieForm.js
@@ -73,12 +73,16 @@ Ext.define('amdaPlotComp.PlotHistogram1DSerieForm', { @@ -73,12 +73,16 @@ Ext.define('amdaPlotComp.PlotHistogram1DSerieForm', {
73 var me = this; 73 var me = this;
74 74
75 var histogram1DItems = [ 75 var histogram1DItems = [
  76 + this.addStandardCombo('histo1d-style', 'Drawing Style', amdaDefaultConfigs.availableHistogram1DStyles, function(name, value, oldValue) {
  77 + me.object.set('histo1d-style', value);
  78 + }),
76 // this.addStandardParamDropTarget('serie-xaxis-param', 'X Parameter', function(name, value, oldValue) { 79 // this.addStandardParamDropTarget('serie-xaxis-param', 'X Parameter', function(name, value, oldValue) {
77 // me.object.set('serie-xaxis-param', value); 80 // me.object.set('serie-xaxis-param', value);
78 // me.crtTree.refresh(); 81 // me.crtTree.refresh();
79 // }), 82 // }),
80 me.getRangeForms(), 83 me.getRangeForms(),
81 // this.addStandardCombo('serie-resampling-mode', 'Reference parameter for resampling', amdaDefaultConfigs.availableResamplingModes), 84 // this.addStandardCombo('serie-resampling-mode', 'Reference parameter for resampling', amdaDefaultConfigs.availableResamplingModes),
  85 +
82 this.addStandardCombo('histo1d-function', 'Function to apply', amdaDefaultConfigs.availableHistogram1DFunctions, function(name, value, oldValue) { 86 this.addStandardCombo('histo1d-function', 'Function to apply', amdaDefaultConfigs.availableHistogram1DFunctions, function(name, value, oldValue) {
83 me.object.set('histo1d-function', value); 87 me.object.set('histo1d-function', value);
84 }), 88 }),