else if( tipo == '0' )
{
//alert('anio');
/*se toma el evento load del store para obtener el numero de registros y filtrar que no sea 0*/
storeRepAnio.on('load', function(){
numRecords2 = storeRepAnio.getCount();
if(numRecords2 == 0)
{
alert('Los parametros ingresados no arrojaron resultados o el vehiculo seleccionado no tiene consumo asignado. Por favor verifique');
return;
}else
{
var registro = storeRepPlacaMes.getAt(0);
var anio = registro.get('anio');
/** VENTANA QUE CONTENDRA LA GRAFICA DE REPORTE POR PLACA **/
var winreporte3 = Ext.create('Ext.Window', {
width: 400,
height: (listView.getHeight()-25),
hidden: false,
maximized:true,
y:30,
maximizable: true,
title: 'Informe reporte por vehiculo',
//renderTo: Ext.getBody(),
layout: 'fit',
items: {
id: 'chartCmp',
xtype: 'chart',
style: 'background:#fff',
animate: true,
shadow: true,
store: storeRepPlacaMes,
legend: {
position: 'right'
},
axes: [{
type: 'Numeric',
position: 'left',
fields: [ 'galones'],
label: {
renderer: Ext.util.Format.numberRenderer('0,00')
},
title: 'Galones consumidos por el vehiculo '+placa,
grid: true,
minimum: 0
},
{
type: 'Category',
position: 'bottom',
fields: 'mes',
title: 'Reporte mensual de '+anio
}
],
series: [{
type: 'column',
axis: 'left',
highlight: true,
tips: {
trackMouse: true,
width: 140,
height: 20,
renderer: function(storeItem, item) {
this.setTitle('Viajes : ' + storeItem.get('viajes'));
}
},
label: {
display: 'insideEnd',
'text-anchor': 'middle',
field: ['galones'],
renderer: Ext.util.Format.numberRenderer('0.00'),
orientation: 'vertical',
color: '#333'
},
// xField: [ 'maximo consumo','maximo consumo','maximo consumo','maximo consumo'],
yField: ['galones']
}
]
}
});
winreporte3.show();
}/**SI EL TIPO DE REPORTE ES ANUAL SE EJECUTARA ESTA ACCION**/
});
storeRepAnio.load({params:{'gas_conductor' : conductor,'anio':anioRe,'anio1':anioReLi}} );
numRecords2 = 0;
}
It looks like you're new here. If you want to get involved, click one of these buttons!
The content of this site is copyrighted by Quizzpot.com, it is prohibited to publish our tutorials on other blogs, magazines or any other media without prior permission.
Copyright © 2012 Quizzpot.
Our visitors are mostly developers and Web designers, advertise with us, you only need to contact us .