angraxs2
21 Aug 2012, 12:33 PM
Hi i have this code working on ST 2.0 + Chart 2.0B but its not showing any columsn with ST2.1 beta.
Ext.define('WapMobile.view.override.GraficoFatEvolFat', {
override: 'WapMobile.view.GraficoFatEvolFat',
config: {
id: 'fat-evolfat-grafico-tablet',
width: '100%',
items: [
{
xtype: 'chart',
store: 'FatEvolucaoFat',
shadow: true,
width: 800,
height: 600,
viewBox: true,
animate:
{
easing: 'bounceOut',
duration: 750
},
interactions:
[
{
type: 'reset'
},
{
type: 'panzoom',
axes:
{
bottom: {}
}
},
{
type: 'iteminfo',
gesture: 'taphold',
panel:
{
html: 'TESTE 123',
dockedItems:
[
{
dock: 'top',
xtype: 'toolbar',
title: 'Detalhes'
}
]
},
listeners:
{
show: function(me, item, panel)
{
panel.setHtml('<ul><li><b>Dia : </b> ' + item.value[0] + '</li><li><b>Valor : </b>' + item.value[1] + '</li></ul>');
}
}
}
],
legend:
{
position:
{
portrait: 'bottom',
landscape: 'bottom'
},
font: '20px Arial'
},
axes:
[
{
type: 'numeric',
position: 'left',
fields:['VALORFAT'],
//title: 'Faturamento',
minimum: 0
},
{
type: 'category',
position: 'bottom',
//title: 'Dia',
fields: ['EMISSAO']
}
],
series:
[
{
type: 'column',
xField: 'EMISSAO',
yField: 'VALORFAT',
axis: 'left'
/*highlight: true,
//showInLegend : true,
listeners:
{
'itemdoubletap': function()
{
console('OK!!!');
Ext.Msg.alert('OK!!');
}
}*/
}
]
}
]
}
});
I have to use the 2.1 beta because the Sencha Charts 2.0 beta does not have iteminfo interaction.
My chart does not display any columns, athough it does update the grids value whenI update the store, and if i double click anywhere the chart, i got this error on the browser´s log:
TypeError: 'undefine' is not an object (evaluating 'items.lenght') -> sencha-touch-all-debug.js:95210
Can someone please help me? Thanks in advance.
EDIT: I found out that iteminfo IS working. The interaction->taphold is that isn't working.
Ext.define('WapMobile.view.override.GraficoFatEvolFat', {
override: 'WapMobile.view.GraficoFatEvolFat',
config: {
id: 'fat-evolfat-grafico-tablet',
width: '100%',
items: [
{
xtype: 'chart',
store: 'FatEvolucaoFat',
shadow: true,
width: 800,
height: 600,
viewBox: true,
animate:
{
easing: 'bounceOut',
duration: 750
},
interactions:
[
{
type: 'reset'
},
{
type: 'panzoom',
axes:
{
bottom: {}
}
},
{
type: 'iteminfo',
gesture: 'taphold',
panel:
{
html: 'TESTE 123',
dockedItems:
[
{
dock: 'top',
xtype: 'toolbar',
title: 'Detalhes'
}
]
},
listeners:
{
show: function(me, item, panel)
{
panel.setHtml('<ul><li><b>Dia : </b> ' + item.value[0] + '</li><li><b>Valor : </b>' + item.value[1] + '</li></ul>');
}
}
}
],
legend:
{
position:
{
portrait: 'bottom',
landscape: 'bottom'
},
font: '20px Arial'
},
axes:
[
{
type: 'numeric',
position: 'left',
fields:['VALORFAT'],
//title: 'Faturamento',
minimum: 0
},
{
type: 'category',
position: 'bottom',
//title: 'Dia',
fields: ['EMISSAO']
}
],
series:
[
{
type: 'column',
xField: 'EMISSAO',
yField: 'VALORFAT',
axis: 'left'
/*highlight: true,
//showInLegend : true,
listeners:
{
'itemdoubletap': function()
{
console('OK!!!');
Ext.Msg.alert('OK!!');
}
}*/
}
]
}
]
}
});
I have to use the 2.1 beta because the Sencha Charts 2.0 beta does not have iteminfo interaction.
My chart does not display any columns, athough it does update the grids value whenI update the store, and if i double click anywhere the chart, i got this error on the browser´s log:
TypeError: 'undefine' is not an object (evaluating 'items.lenght') -> sencha-touch-all-debug.js:95210
Can someone please help me? Thanks in advance.
EDIT: I found out that iteminfo IS working. The interaction->taphold is that isn't working.