Commit 7b86b04fe638324b51eb34036b8cbafb8f6f1975

Authored by Erdogan Furkan
1 parent 5b1abd71

IHM modifications for #7616

js/app/models/PlotObjects/PlotIntervalsObject.js
... ... @@ -21,7 +21,16 @@ Ext.define('amdaPlotObj.PlotIntervalsObject', {
21 21 ],
22 22  
23 23 fields: [
24   - { name: 'intervals-color', type: 'string', defaultValue: "none", },
  24 + { name: 'intervals-color', type: 'string', defaultValue: "none" },
  25 + { name: 'legend-text-value', type: 'string' },
  26 + { name: 'legend-text-position', type: 'string', defaultValue: "top" },
  27 + { name: 'legend-text-color', type: 'string' },
  28 + { name: 'legend-text-font-activated', type: 'boolean' },
  29 + { name: 'legend-text-font-name', type: 'string', defaultValue: "sans-serif" },
  30 + { name: 'legend-text-font-size', type: 'int', defaultValue: "12" },
  31 + { name: 'legend-text-font-bold', type: 'boolean' },
  32 + { name: 'legend-text-font-italic', type: 'boolean' }
  33 +
25 34 ],
26 35  
27 36 constructor: function(){
... ... @@ -41,12 +50,30 @@ Ext.define('amdaPlotObj.PlotIntervalsObject', {
41 50 setDefaultValues: function()
42 51 {
43 52 this.set('intervals-color', amdaPlotObj.PlotObjectConfig.defaultValues.intervals.color);
  53 + this.set('legend-text-value', '');
  54 + this.set('legend-text-position', amdaPlotObj.PlotObjectConfig.defaultValues.legends.text.position);
  55 + this.set('legend-text-color', amdaPlotObj.PlotObjectConfig.defaultValues.legends.text.color);
  56 + this.set('legend-text-font-activated', false);
  57 + this.set('legend-text-font-name', amdaPlotObj.PlotObjectConfig.defaultValues.legends.text.font.name);
  58 + this.set('legend-text-font-size', amdaPlotObj.PlotObjectConfig.defaultValues.legends.text.font.size);
  59 + this.set('legend-text-font-bold', false);
  60 + this.set('legend-text-font-italic', false);
  61 +
  62 +
44 63 },
45 64  
46 65 getJsonValues : function()
47 66 {
48 67 var intervalsValues = new Object();
49 68 intervalsValues['intervals-color'] = this.get('intervals-color');
  69 + intervalsValues['legend-text-value'] = this.get('legend-text-value');
  70 + intervalsValues['legend-text-position'] = this.get('legend-text-position');
  71 + intervalsValues['legend-text-color'] = this.get('legend-text-color');
  72 + intervalsValues['legend-text-font-activated'] = this.get('legend-text-font-activated');
  73 + intervalsValues['legend-text-font-name'] = this.get('legend-text-font-name');
  74 + intervalsValues['legend-text-font-size'] = this.get('legend-text-font-size');
  75 + intervalsValues['legend-text-font-bold'] = this.get('legend-text-font-bold');
  76 + intervalsValues['legend-text-font-italic'] = this.get('legend-text-font-italic');
50 77  
51 78 return intervalsValues;
52 79 }
... ...
js/app/views/PlotComponents/PlotIntervalsForm.js
... ... @@ -17,7 +17,14 @@ Ext.define('amdaPlotComp.PlotIntervalsForm', {
17 17 },
18 18  
19 19 getFormItems: function() {
20   - return [this.addColorsPicker('intervals-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColorsNew, 'none')
  20 + var legendItems = [
  21 + this.addStandardText('legend-text-value', 'Text'),
  22 + this.addStandardCombo('legend-text-position', 'Position', amdaPlotObj.PlotObjectConfig.availableLegendTextPositions),
  23 + this.addStandardFont('legend-text-font')]
  24 +
  25 + return [
  26 + this.addColorsPicker('intervals-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColorsNew, 'none'),
  27 + this.addStandardFieldSet('Legend', 'legend-text-font-activated', legendItems)
21 28 ];
22 29 }
23 30 });
... ...