Blame view

js/app/views/PlotComponents/PlotBaseAxisForm.js 2.23 KB
abe09878   Benjamin Renard   Add panels and ax...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/**
 * Project   : AMDA-NG
 * Name      : PlotBaseAxisForm.js
 * @class   amdaPlotComp.PlotBaseAxisForm
 * @extends amdaPlotComp.PlotStandardForm
 * @brief   Form to define common options of all axes
 * @author  Benjamin Renard
 * @version $Id: PlotBaseAxisForm.js benjamin $
 */

Ext.define('amdaPlotComp.PlotBaseAxisForm', {
	extend: 'amdaPlotComp.PlotStandardForm',
	
	showScaleOption  : true,
	showColorOption  : true,
	showRangeOptions : true,
	showTickGridOptions : true,
	
	getFormItems: function() {
		var rangeItems = [
afb7b464   Benjamin Renard   Fix decimal preci...
21
22
                this.addStandardFloat2('axis-range-min', 'Min', -Number.MAX_VALUE, Number.MAX_VALUE),
                this.addStandardFloat2('axis-range-max', 'Max', -Number.MAX_VALUE, Number.MAX_VALUE),
abe09878   Benjamin Renard   Add panels and ax...
23
24
25
26
                this.addStandardCheck('axis-range-extend', 'Extend Axis Range')
		];
		
		var legendItems = [
24b02d83   Benjamin Renard   Add definition of...
27
                this.addStandardText('axis-legend-text', 'Text'),
abe09878   Benjamin Renard   Add panels and ax...
28
29
30
31
32
33
		        this.addStandardColor('axis-legend-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors),
		        this.addStandardFont('axis-legend-font')
		];
		
		var tickGridItems = [
                this.addStandardCombo('axis-tick-position', 'Ticks position', amdaPlotObj.PlotObjectConfig.availableTicksPositions),
24b02d83   Benjamin Renard   Add definition of...
34
35
36
                this.addStandardCheck('axis-tick-showmarks', 'Show tick marks'),
                this.addStandardCheck('axis-grid-major', 'Show major grid'),
                this.addStandardCheck('axis-grid-minor', 'Show minor grid')
abe09878   Benjamin Renard   Add panels and ax...
37
38
39
40
41
42
43
44
45
46
47
        ];
		
		var axisItems = [];
		if (this.showScaleOption)
			axisItems.push(this.addStandardCombo('axis-scale', 'Scale', amdaPlotObj.PlotObjectConfig.availableAxisScales));
		if (this.showColorOption)
			axisItems.push(this.addStandardColor('axis-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors));
		axisItems.push(this.addStandardFloat('axis-thickness', 'Thickness', 1, 10));
		axisItems.push(this.addStandardCheck('axis-reverse', 'Reverse direction'));
		if (this.showRangeOptions)
			axisItems.push(this.addStandardFieldSet('Range', '', rangeItems));
24b02d83   Benjamin Renard   Add definition of...
48
		axisItems.push(this.addStandardFieldSet('Legend', 'axis-legend-activated', legendItems));
abe09878   Benjamin Renard   Add panels and ax...
49
50
51
52
53
		if (this.showTickGridOptions)
			axisItems.push(this.addStandardFieldSet('Ticks and Grid', '', tickGridItems));
		
		return axisItems;
	}
afb7b464   Benjamin Renard   Fix decimal preci...
54
});