PDA

View Full Version : this.swf.setDataProvider is not a function



fabiojpoli
16 Oct 2010, 4:42 AM
Good morning everybody, I'm having the same problem mentioned in this topic: http://www.sencha.com/forum/showthread.php?76860-CLOSED-3.0.0-this.swf.setDataProvider-is-not-a-function

But I do not have access to the Ext SVN, could someone pass me this fix mentioned in the topic?

Thanks in advance.

Thanks!

fabiojpoli
16 Oct 2010, 6:11 AM
Adopted the solution posted in this topic: http://www.sencha.com/forum/showthread.php?78788-OPEN-197-3.0.0-svn-5208-this.swf.setDataprovider-is-not-a-function/page4

Optimal solution by the way, but I noticed another problem.

When creating the chart, I use the mask currency:

yAxis: new Ext.chart.NumericAxis({
title: 'Valor',
labelRenderer: Ext.util.Format.brMoney
}),At first, the mask is applied, but after that no longer works, the values appear without the mask, someone has been there before?

Thanks!

fabiojpoli
16 Oct 2010, 9:59 AM
Adopted the solution posted in this topic: http://www.sencha.com/forum/showthread.php?78788-OPEN-197-3.0.0-svn-5208-this.swf.setDataprovider-is-not-a-function/page4

Optimal solution by the way, but I noticed another problem.

When creating the chart, I use the mask currency:

yAxis: new Ext.chart.NumericAxis({
title: 'Valor',
labelRenderer: Ext.util.Format.brMoney
}),At first, the mask is applied, but after that no longer works, the values appear without the mask, someone has been there before?

Thanks!

I managed to solve by setting the yaxis in the show () instead of Window's set in graph creation


this.valorMoeda = new Ext.chart.NumericAxis({
title: 'Valor',
labelRenderer: Ext.util.Format.brMoney
})


this.graficoColuna = new Ext.chart.ColumnChart({
store: this.storeMovimentacoes,
url:'lib/ext3.2.1/resources/charts.swf',
xField: 'mesAno',
xAxis: new Ext.chart.CategoryAxis({
title: 'Mês/Ano'
}),
series: [{
yField: 'totalEntrada',
style:{color: '499245'},
displayName:'Entrada'
},{
yField: 'totalSaida',
style:{color: 'e8141c'},
displayName:'Saída'
}],
extraStyle:{
legend:{display: 'bottom'}
},
//yAxis: this.valorMoeda,
tipRenderer : function(chart, record, index, series){
var strInfo = series.displayName + '\n' + chart.xAxis.title + ': ' + record.data.mesAno +
'\n' + chart.yAxis.title + ': ' + Ext.util.Format.brMoney(eval('record.data.' + series.yField));
return strInfo;
}
});


show: function()
{
MovimentacaoGrafico.superclass.show.call(this, arguments);
this.graficoColuna.yAxis = this.valorMoeda;
},