Commit 5b1abd7112b76f14b5befb04ee5181a2ab6050c0

Authored by Erdogan Furkan
1 parent 76447670

7616 - Adding color option for interval and status bar plots

js/app/models/PlotObjects/PlotIntervalsObject.js
... ... @@ -20,7 +20,8 @@ Ext.define('amdaPlotObj.PlotIntervalsObject', {
20 20 'amdaPlotObj.PlotObjectConfig'
21 21 ],
22 22  
23   - fields : [
  23 + fields: [
  24 + { name: 'intervals-color', type: 'string', defaultValue: "none", },
24 25 ],
25 26  
26 27 constructor: function(){
... ... @@ -39,12 +40,14 @@ Ext.define('amdaPlotObj.PlotIntervalsObject', {
39 40  
40 41 setDefaultValues: function()
41 42 {
  43 + this.set('intervals-color', amdaPlotObj.PlotObjectConfig.defaultValues.intervals.color);
42 44 },
43 45  
44 46 getJsonValues : function()
45 47 {
46 48 var intervalsValues = new Object();
47   -
  49 + intervalsValues['intervals-color'] = this.get('intervals-color');
  50 +
48 51 return intervalsValues;
49 52 }
50 53 });
... ...
js/app/models/PlotObjects/PlotObjectConfig.js
... ... @@ -147,6 +147,12 @@ Ext.define('amdaPlotObj.PlotObjectConfig', {
147 147 yAxis: 'y-right',
148 148 resolution: 3000
149 149 },
  150 + intervals: {
  151 + color: "none"
  152 + },
  153 + statusbar: {
  154 + color: "none"
  155 + },
150 156 legends: {
151 157 series: {
152 158 type: 'text-only',
... ...
js/app/models/PlotObjects/PlotStatusBarObject.js
1 1 /**
2 2 * Project  : AMDA-NG
3   - * Name : PlotTickBarObject.js
4   - * @class amdaPlotObj.PlotTickBarObject
  3 + * Name : PlotStatusBarObject.js
  4 + * @class amdaPlotObj.PlotStatusBarObject
5 5 * @extends Ext.data.Model
6 6 * @brief Plot Tick Bar Business Object Definition
7 7 * @author Benjamin Renard
8   - * @version $Id: PlotTickBarObject.js benjamin $
  8 + * @version $Id: PlotStatusBarObject.js benjamin $
9 9 ******************************************************************************
10 10 * FT Id : Date : Name - Description
11 11 ******************************************************************************
... ... @@ -13,14 +13,15 @@
13 13 */
14 14  
15 15  
16   -Ext.define('amdaPlotObj.PlotTickBarObject', {
  16 +Ext.define('amdaPlotObj.PlotStatusBarObject', {
17 17 extend: 'Ext.data.Model',
18 18  
19 19 requires: [
20 20 'amdaPlotObj.PlotObjectConfig'
21 21 ],
22 22  
23   - fields : [
  23 + fields: [
  24 + { name: 'statusbar-color', type: 'string', defaultValue: "none", },
24 25 ],
25 26  
26 27 constructor: function(){
... ... @@ -39,12 +40,14 @@ Ext.define('amdaPlotObj.PlotTickBarObject', {
39 40  
40 41 setDefaultValues: function()
41 42 {
  43 + this.set('statusbar-color', amdaPlotObj.PlotObjectConfig.defaultValues.statusbar.color);
42 44 },
43 45  
44 46 getJsonValues : function()
45 47 {
46   - var tickBarValues = new Object();
  48 + var statusBarValues = new Object();
  49 + statusBarValues['statusbar-color'] = this.get('statusbar-color');
47 50  
48   - return tickBarValues;
  51 + return statusBarValues;
49 52 }
50 53 });
51 54 \ No newline at end of file
... ...
js/app/models/PlotObjects/PlotTickBarObject.js
1 1 /**
2 2 * Project  : AMDA-NG
3   - * Name : PlotStatusBarObject.js
4   - * @class amdaPlotObj.PlotStatusBarObject
  3 + * Name : PlotTickBarObject.js
  4 + * @class amdaPlotObj.PlotTickBarObject
5 5 * @extends Ext.data.Model
6 6 * @brief Plot Status Bar Business Object Definition
7 7 * @author Benjamin Renard
8   - * @version $Id: PlotStatusBarObject.js benjamin $
  8 + * @version $Id: PlotTickBarObject.js benjamin $
9 9 ******************************************************************************
10 10 * FT Id : Date : Name - Description
11 11 ******************************************************************************
... ... @@ -13,7 +13,7 @@
13 13 */
14 14  
15 15  
16   -Ext.define('amdaPlotObj.PlotStatusBarObject', {
  16 +Ext.define('amdaPlotObj.PlotTickBarObject', {
17 17 extend: 'Ext.data.Model',
18 18  
19 19 requires: [
... ... @@ -43,8 +43,8 @@ Ext.define('amdaPlotObj.PlotStatusBarObject', {
43 43  
44 44 getJsonValues : function()
45 45 {
46   - var statusBarValues = new Object();
  46 + var tickBarValues = new Object();
47 47  
48   - return statusBarValues;
  48 + return tickBarValues;
49 49 }
50 50 });
51 51 \ No newline at end of file
... ...
js/app/views/PlotComponents/PlotIntervalsForm.js
... ... @@ -17,7 +17,7 @@ Ext.define('amdaPlotComp.PlotIntervalsForm', {
17 17 },
18 18  
19 19 getFormItems: function() {
20   - return [
  20 + return [this.addColorsPicker('intervals-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColorsNew, 'none')
21 21 ];
22 22 }
23 23 });
... ...
js/app/views/PlotComponents/PlotStatusBarForm.js
... ... @@ -17,7 +17,7 @@ Ext.define('amdaPlotComp.PlotStatusBarForm', {
17 17 },
18 18  
19 19 getFormItems: function() {
20   - return [
  20 + return [this.addColorsPicker('statusbar-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColorsNew, 'none')
21 21 ];
22 22 }
23 23 });
24 24 \ No newline at end of file
... ...