diff --git a/js/app/views/VisuUI.js b/js/app/views/VisuUI.js index 6d881f1..b467896 100644 --- a/js/app/views/VisuUI.js +++ b/js/app/views/VisuUI.js @@ -212,11 +212,18 @@ Ext.define('amdaUI.VisuUI', { }] } + var plotTypeList = Ext.create('Ext.data.Store', { + fields: ['type'], + data: [ + { 'type': 'line' }, + { 'type': 'scatter' } + ] + }); + var parList = Ext.create('Ext.data.Store', { fields: [], autoload : false - }); - + }); var chart = Ext.create('Ext.chart.Chart', this.chartConfig); @@ -238,7 +245,7 @@ Ext.define('amdaUI.VisuUI', { } } }); - + this.parCombo1 = Ext.create('Ext.form.ComboBox', { emptyText: 'select parameter', editable: false, @@ -256,6 +263,21 @@ Ext.define('amdaUI.VisuUI', { this.chartConfig.series[0].yField = newValue; } } + }); + + var plotTypeCombo = Ext.create('Ext.form.ComboBox', { + emptyText: 'select plot type', + editable: false, + store: plotTypeList, + queryMode: 'local', + displayField: 'type', + valueField: 'type', + listeners : { + scope : this, + change : function(combo, newValue, oldValue) { + this.chartConfig.series[0].type = newValue; + } + } }); @@ -318,7 +340,10 @@ Ext.define('amdaUI.VisuUI', { }, { xtype : 'fieldset', - title : 'Plotting Options' + title : 'Plotting Options', + items : [ + plotTypeCombo + ] } ], fbar:[ -- libgit2 0.21.2