Commit fcaf463e authored by icyrizard's avatar icyrizard

fixed a bug

parent 1fca4860
...@@ -86,7 +86,8 @@ Ext.define('app.controller.ChartController', { ...@@ -86,7 +86,8 @@ Ext.define('app.controller.ChartController', {
columns = array[0]; columns = array[0];
volume = []; volume = [];
time = []; time = [];
data = [] data = [];
for (i = 1; i < array.length; i++) for (i = 1; i < array.length; i++)
{ {
...@@ -96,8 +97,9 @@ Ext.define('app.controller.ChartController', { ...@@ -96,8 +97,9 @@ Ext.define('app.controller.ChartController', {
volume : parseInt(line_clmns[2]), volume : parseInt(line_clmns[2]),
}); });
} }
console.log(data);
store.setData(data); store.setData(data);
console.log(store);
this.openChart(); this.openChart();
}, },
......
...@@ -3,6 +3,6 @@ Ext.define('app.store.chartStore', { ...@@ -3,6 +3,6 @@ Ext.define('app.store.chartStore', {
extend: 'Ext.data.JsonStore', extend: 'Ext.data.JsonStore',
config : { config : {
fields: ['time', 'volume'] fields: ['time', 'volume'],
} }
}); });
\ No newline at end of file
...@@ -14,7 +14,7 @@ Ext.define('app.view.Chart', { ...@@ -14,7 +14,7 @@ Ext.define('app.view.Chart', {
theme: 'Base', theme: 'Base',
animate: true, animate: true,
id: 'flood-chart-id', id: 'flood-chart-id',
store: ',', store: 'chartStore',
left: 20, left: 20,
width: 490, width: 490,
height: 400, height: 400,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment