Blame view

js/app/models/PlotObjects/PlotHistogram1DSerieObject.js 3.16 KB
2ac3a3f9   Erdogan Furkan   For now, histo1D ...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**
 * Project      : TMA-AMDA
 * Name         : PlotHistogram1DSerieObject.js
 * @class   amdaPlotObj.PlotHistogram1DSerieObject
 * @extends amdaPlotObj.PlotBaseSerieObject
 * @brief   Plot Histogram1D Business Object Definition 
 * @author  Furkan Erdogan
 * @version $Id: PlotHistogram1DSerieObject.js furkan $
 ******************************************************************************
 *    FT Id     :   Date   : Name - Description
 ******************************************************************************
 *	:           :08/02/2023: FER  - file creation
 */
 
 		
Ext.define('amdaPlotObj.PlotHistogram1DSerieObject', {
	extend: 'amdaPlotObj.PlotBaseSerieObject',
	requires: ['amdaPlotObj.PlotAxisObject'],
	fields : [
        // {name: 'serie-xaxis-param', type: 'string'},
        // {name: 'serie-resampling-mode', type: 'string'},
3e01c3cc   Erdogan Furkan   11372 - Done
22
			  {name: 'histo1d-yaxis', type: 'string'},
2ac3a3f9   Erdogan Furkan   For now, histo1D ...
23
			  {name: 'histo1d-function', type: 'string'},
ac2e2d61   Furkan   #11372 - Adding n...
24
			  {name: 'histotype-param', type: 'string' },
2ac3a3f9   Erdogan Furkan   For now, histo1D ...
25
			  {name: 'histo1d-xbinnumber', type: 'int'},
c4d04b8c   Erdogan Furkan   #11376 - Done.
26
			  {name: 'histo1d-style', type: 'string'},
2ac3a3f9   Erdogan Furkan   For now, histo1D ...
27
28
29
30
31
			  {name: 'histo1d-color', type: 'string', defaultValue: "none"}
    ],
    
    constructor: function(){
        var me = this;
b4553b19   Myriam Bouchemit   Fix compatibility...
32
33
34
35
36
37
38
39
40
41
	if ((arguments.length > 0) && arguments[0]) {
        	if (!arguments[0]['histo1d-yaxis']) {
            		// Compatibility mode to support old saved requests
            		arguments[0]['histo1d-yaxis'] = amdaDefaultValues.plot.histogram1D.histo1DyAxis;
        	}
        	if (!arguments['histo1d-style']) {
            		// Compatibility mode to support old saved requests
            		arguments[0]['histo1d-style'] = amdaDefaultValues.plot.histogram1D.histo1DStyle;
        	}
	}
2ac3a3f9   Erdogan Furkan   For now, histo1D ...
42
43
44
45
46
47
48
        me.callParent(arguments);
    },
    
    setDefaultValues: function()
    {
    	// this.set('serie-xaxis-param', '');
    	// this.set('serie-resampling-mode', amdaDefaultValues.plot.serie.resamplingMode);
3e01c3cc   Erdogan Furkan   11372 - Done
49
		this.set('histo1d-yaxis', amdaDefaultValues.plot.histogram1D.histo1DyAxis);
2ac3a3f9   Erdogan Furkan   For now, histo1D ...
50
		this.set('histo1d-function', amdaDefaultValues.plot.histogram1D.histo1DFunction);
ac2e2d61   Furkan   #11372 - Adding n...
51
    	this.set('histotype-param', '');
2ac3a3f9   Erdogan Furkan   For now, histo1D ...
52
    	this.set('histo1d-xbinnumber', amdaDefaultValues.plot.histogram1D.xbinnumber);
c4d04b8c   Erdogan Furkan   #11376 - Done.
53
    	this.set('histo1d-style', amdaDefaultValues.plot.histogram1D.histo1DStyle);
2ac3a3f9   Erdogan Furkan   For now, histo1D ...
54
55
56
57
58
59
60
61
62
63
    	this.set('histo1d-color', amdaDefaultValues.plot.histogram1D.color);

	this.callParent(arguments);
    },
    
    getJsonValues : function() 
    {
    	var serieValues  = this.callParent(arguments);
    	// serieValues['serie-xaxis-param'] = this.get('serie-xaxis-param');
    	// serieValues['serie-resampling-mode'] = this.get('serie-resampling-mode');
3e01c3cc   Erdogan Furkan   11372 - Done
64
    	serieValues['histo1d-yaxis'] = this.get('histo1d-yaxis');
2ac3a3f9   Erdogan Furkan   For now, histo1D ...
65
    	serieValues['histo1d-function'] = this.get('histo1d-function');
ac2e2d61   Furkan   #11372 - Adding n...
66
    	serieValues['histotype-param'] = this.get('histotype-param');
2ac3a3f9   Erdogan Furkan   For now, histo1D ...
67
		serieValues['histo1d-xbinnumber'] = this.get('histo1d-xbinnumber');
c4d04b8c   Erdogan Furkan   #11376 - Done.
68
		serieValues['histo1d-style'] = this.get('histo1d-style');
2ac3a3f9   Erdogan Furkan   For now, histo1D ...
69
70
71
72
73
74
75
		serieValues['histo1d-color'] = this.get('histo1d-color');
    //   serieValues['histo1D-ybinnumber'] = this.get('histo1D-ybinnumber');
    //   serieValues['histo1D-smoothfactor'] = this.get('histo1D-smoothfactor');
    	
    	return serieValues;
    }
});