Dmitry Apanasevich
20 Nov 2012, 5:22 AM
REQUIRED INFORMATION
Ext version tested:
Sencha Touch 2.1.0
Browser versions tested against:
Chrome 23 (Windows)
Description:
Ext.chart.Chart - setting new store doesn't not update chart
Steps to reproduce the problem:
Create an Ext.chart.Chart with empty store. Then set new store with data
The result that was expected:
Chart should be refreshed
The result that occurs instead:
Nothing changed, chart displays old data
Test Case:
Code:
var store = Ext.create('Ext.data.Store', {
fields: ['name', 'value'],
data: [
{ name: 'Jan', value: 110},
{ name: 'Feb', value: 252},
{ name: 'Mar', value: 952},
{ name: 'Apr', value: 325},
{ name: 'May', value: 123},
{ name: 'Jun', value: 52},
{ name: 'Jul', value: 1122},
{ name: 'Aug', value: 35},
{ name: 'Sep', value: 172},
{ name: 'Oct', value: 752},
{ name: 'Nov', value: 810},
{ name: 'Dec', value: 410}
]
});
var chart = Ext.create("Ext.chart.Chart", {
fullscreen: true,
store: {
fields: ['name', 'value'],
data: [
]
},
animate: false,
interactions: ['panzoom'],
series: [
{
type: 'line',
xField: 'name',
yField: 'value',
style: {
fill: 'rgba(0,40,170,0.3)',
stroke: 'black'
}
}
],
axes: [
{
type: 'numeric',
position: 'left',
title: 'Number of Hits',
minimum: 0,
maximum: 1200,
grid: {
fill: '#efefef',
odd: {
fill: '#cdcdcd'
},
even: {
lineWidth: 3
}
}
},
{
type: 'category',
position: 'bottom',
title: 'Month of the Year',
grid: true,
style: {
estStepSize: 1
}
}
]
});
chart.setStore(store);
HELPFUL INFORMATION
You can reproduce this issue by modifying live example in Axis section of http://docs.sencha.com/touch/2-1/#!/guide/drawing_and_charting
Debugging already done:
none
Possible fix:
not provided
Additional CSS used:
only default sencha-touch.css
Operating System:
Windows
Ext version tested:
Sencha Touch 2.1.0
Browser versions tested against:
Chrome 23 (Windows)
Description:
Ext.chart.Chart - setting new store doesn't not update chart
Steps to reproduce the problem:
Create an Ext.chart.Chart with empty store. Then set new store with data
The result that was expected:
Chart should be refreshed
The result that occurs instead:
Nothing changed, chart displays old data
Test Case:
Code:
var store = Ext.create('Ext.data.Store', {
fields: ['name', 'value'],
data: [
{ name: 'Jan', value: 110},
{ name: 'Feb', value: 252},
{ name: 'Mar', value: 952},
{ name: 'Apr', value: 325},
{ name: 'May', value: 123},
{ name: 'Jun', value: 52},
{ name: 'Jul', value: 1122},
{ name: 'Aug', value: 35},
{ name: 'Sep', value: 172},
{ name: 'Oct', value: 752},
{ name: 'Nov', value: 810},
{ name: 'Dec', value: 410}
]
});
var chart = Ext.create("Ext.chart.Chart", {
fullscreen: true,
store: {
fields: ['name', 'value'],
data: [
]
},
animate: false,
interactions: ['panzoom'],
series: [
{
type: 'line',
xField: 'name',
yField: 'value',
style: {
fill: 'rgba(0,40,170,0.3)',
stroke: 'black'
}
}
],
axes: [
{
type: 'numeric',
position: 'left',
title: 'Number of Hits',
minimum: 0,
maximum: 1200,
grid: {
fill: '#efefef',
odd: {
fill: '#cdcdcd'
},
even: {
lineWidth: 3
}
}
},
{
type: 'category',
position: 'bottom',
title: 'Month of the Year',
grid: true,
style: {
estStepSize: 1
}
}
]
});
chart.setStore(store);
HELPFUL INFORMATION
You can reproduce this issue by modifying live example in Axis section of http://docs.sencha.com/touch/2-1/#!/guide/drawing_and_charting
Debugging already done:
none
Possible fix:
not provided
Additional CSS used:
only default sencha-touch.css
Operating System:
Windows