PlotSerieForm.js
2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
* Project : AMDA-NG
* Name : PlotSerieForm.js
* @class amdaPlotComp.PlotSerieForm
* @extends amdaPlotComp.PlotStandardForm
* @brief Form to define specifics serie options
* @author Benjamin Renard
* @version $Id: PlotSerieForm.js benjamin $
*/
Ext.define('amdaPlotComp.PlotSerieForm', {
extend: 'amdaPlotComp.PlotStandardForm',
setObject : function(object) {
this.object = object.get('param-drawing-object');
this.loadRecord(this.object);
this.updateOptions(this.crtTree.getSelectedPlotType());
},
updateOptions: function(plotType) {
var xParamField = this.getForm().findField('serie-xaxis-param');
var resamplingModeField = this.getForm().findField('serie-resampling-mode');
var isScatter = (plotType == 'xyPlot');
xParamField.setVisible(isScatter);
resamplingModeField.setVisible(isScatter);
},
getFormItems: function() {
var linesItems = [
this.addStandardCombo('serie-lines-style', 'Style', amdaPlotObj.PlotObjectConfig.availableLinesStyles),
this.addStandardFloat('serie-lines-width', 'Width', 1, 10),
this.addStandardColor('serie-lines-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors)
];
var symbolsItems = [
this.addStandardCombo('serie-symbols-type', 'Type', amdaPlotObj.PlotObjectConfig.availableSymbolsTypes),
this.addStandardFloat('serie-symbols-size', 'Size', 1, 10),
this.addStandardColor('serie-symbols-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors)
];
return [
this.addStandardParamDropTarget('serie-xaxis-param', 'X Parameter'),
this.addStandardCombo('serie-resampling-mode', 'Reference parameter for resampling', amdaPlotObj.PlotObjectConfig.availableResamplingModes),
this.addStandardCombo('serie-yaxis', 'Y axis', amdaPlotObj.PlotObjectConfig.availableYAxes),
this.addStandardParamDropTarget('serie-colored-param', 'Colored Parameter'),
this.addStandardFieldSet('Lines', 'serie-lines-activated', linesItems),
this.addStandardFieldSet('Symbols', 'serie-symbols-activated', symbolsItems)
];
}
});