Commit f965628cecacf086633b6969e963e3871fd85f1f
1 parent
86263051
Exists in
master
and in
112 other branches
plottype
Showing
1 changed file
with
29 additions
and
4 deletions
Show diff stats
js/app/views/VisuUI.js
... | ... | @@ -212,11 +212,18 @@ Ext.define('amdaUI.VisuUI', { |
212 | 212 | }] |
213 | 213 | } |
214 | 214 | |
215 | + var plotTypeList = Ext.create('Ext.data.Store', { | |
216 | + fields: ['type'], | |
217 | + data: [ | |
218 | + { 'type': 'line' }, | |
219 | + { 'type': 'scatter' } | |
220 | + ] | |
221 | + }); | |
222 | + | |
215 | 223 | var parList = Ext.create('Ext.data.Store', { |
216 | 224 | fields: [], |
217 | 225 | autoload : false |
218 | - }); | |
219 | - | |
226 | + }); | |
220 | 227 | |
221 | 228 | var chart = Ext.create('Ext.chart.Chart', this.chartConfig); |
222 | 229 | |
... | ... | @@ -238,7 +245,7 @@ Ext.define('amdaUI.VisuUI', { |
238 | 245 | } |
239 | 246 | } |
240 | 247 | }); |
241 | - | |
248 | + | |
242 | 249 | this.parCombo1 = Ext.create('Ext.form.ComboBox', { |
243 | 250 | emptyText: 'select parameter', |
244 | 251 | editable: false, |
... | ... | @@ -256,6 +263,21 @@ Ext.define('amdaUI.VisuUI', { |
256 | 263 | this.chartConfig.series[0].yField = newValue; |
257 | 264 | } |
258 | 265 | } |
266 | + }); | |
267 | + | |
268 | + var plotTypeCombo = Ext.create('Ext.form.ComboBox', { | |
269 | + emptyText: 'select plot type', | |
270 | + editable: false, | |
271 | + store: plotTypeList, | |
272 | + queryMode: 'local', | |
273 | + displayField: 'type', | |
274 | + valueField: 'type', | |
275 | + listeners : { | |
276 | + scope : this, | |
277 | + change : function(combo, newValue, oldValue) { | |
278 | + this.chartConfig.series[0].type = newValue; | |
279 | + } | |
280 | + } | |
259 | 281 | }); |
260 | 282 | |
261 | 283 | |
... | ... | @@ -318,7 +340,10 @@ Ext.define('amdaUI.VisuUI', { |
318 | 340 | }, |
319 | 341 | { |
320 | 342 | xtype : 'fieldset', |
321 | - title : 'Plotting Options' | |
343 | + title : 'Plotting Options', | |
344 | + items : [ | |
345 | + plotTypeCombo | |
346 | + ] | |
322 | 347 | } |
323 | 348 | ], |
324 | 349 | fbar:[ |
... | ... |