var lvalores = []; lvalores.push(['2004','Ago - 04','10']); lvalores.push(['2004','Sep - 04','73']); lvalores.push(['2004','Oct - 04','52']); lvalores.push(['2004','Nov - 04','107']); lvalores.push(['2004','Dic - 04','38']); lvalores.push(['2005','Ene - 05','30']); lvalores.push(['2005','Feb - 05','50']); lvalores.push(['2005','Mar - 05','53']); lvalores.push(['2005','Abr - 05','62']); lvalores.push(['2005','May - 05','70']); lvalores.push(['2005','Jun - 05','80']); lvalores.push(['2005','Jul - 05','49']); lvalores.push(['2005','Ago - 05','55']); lvalores.push(['2005','Sep - 05','58']); lvalores.push(['2005','Oct - 05','94']); lvalores.push(['2005','Nov - 05','73']); lvalores.push(['2005','Dic - 05','23']); lvalores.push(['2006','Ene - 06','147']); lvalores.push(['2006','Feb - 06','68']); lvalores.push(['2006','Mar - 06','133']); lvalores.push(['2006','Abr - 06','66']); lvalores.push(['2006','May - 06','75']); lvalores.push(['2006','Jun - 06','60']); lvalores.push(['2006','Jul - 06','63']); lvalores.push(['2006','Ago - 06','107']); lvalores.push(['2006','Sep - 06','89']); lvalores.push(['2006','Oct - 06','139']); lvalores.push(['2006','Nov - 06','176']); lvalores.push(['2006','Dic - 06','66']); lvalores.push(['2007','Ene - 07','162']); lvalores.push(['2007','Feb - 07','135']); lvalores.push(['2007','Mar - 07','117']); lvalores.push(['2007','Abr - 07','134']); lvalores.push(['2007','May - 07','136']); lvalores.push(['2007','Jun - 07','133']); lvalores.push(['2007','Jul - 07','134']); lvalores.push(['2007','Ago - 07','155']); lvalores.push(['2007','Sep - 07','110']); lvalores.push(['2007','Oct - 07','127']); lvalores.push(['2007','Nov - 07','94']); lvalores.push(['2007','Dic - 07','57']); lvalores.push(['2008','Ene - 08','125']); lvalores.push(['2008','Feb - 08','142']); lvalores.push(['2008','Mar - 08','101']); lvalores.push(['2008','Abr - 08','180']); lvalores.push(['2008','May - 08','76']); lvalores.push(['2008','Jun - 08','160']); lvalores.push(['2008','Jul - 08','77']); lvalores.push(['2008','Ago - 08','169']); lvalores.push(['2008','Sep - 08','180']); lvalores.push(['2008','Oct - 08','166']); lvalores.push(['2008','Nov - 08','136']); lvalores.push(['2008','Dic - 08','84']); lvalores.push(['2009','Ene - 09','153']); lvalores.push(['2009','Feb - 09','149']); lvalores.push(['2009','Mar - 09','222']); lvalores.push(['2009','Abr - 09','135']); lvalores.push(['2009','May - 09','104']); lvalores.push(['2009','Jun - 09','96']); lvalores.push(['2009','Jul - 09','487']); lvalores.push(['2009','Ago - 09','284']); lvalores.push(['2009','Sep - 09','175']); lvalores.push(['2009','Oct - 09','145']); lvalores.push(['2009','Nov - 09','152']); lvalores.push(['2009','Dic - 09','57']); lvalores.push(['2010','Ene - 10','133']); lvalores.push(['2010','Feb - 10','146']); var inicial = lvalores.length - 1 function cambia(direccion) { pasa = 0 if(direccion==2) { if(inicial < (lvalores.length - 1) ) { pasa = 1 inicial = inicial +1 } } else { pasa = 1 inicial = inicial - 1 if(inicial<3) { inicial=3 pasa = 0 } } if(pasa == 1) { data['elements'][0]['values'][0]['top'] = parseInt(lvalores[inicial-3][2]); data['x_axis']['labels']['labels'][0] = lvalores[inicial-3][1] data['elements'][0]['values'][1]['top'] = parseInt(lvalores[inicial-2][2]); data['x_axis']['labels']['labels'][1] = lvalores[inicial-2][1] data['elements'][0]['values'][2]['top'] = parseInt(lvalores[inicial-1][2]); data['x_axis']['labels']['labels'][2] = lvalores[inicial-1][1] data['elements'][0]['values'][3]['top'] =parseInt(lvalores[inicial][2]); data['x_axis']['labels']['labels'][3] = lvalores[inicial][1] tmp = findSWF("my_chart"); x = tmp.load( JSON.stringify(data) ); } } function ofc_ready() { } function open_flash_chart_data() { return JSON.stringify(data); } function findSWF(movieName) { if (navigator.appName.indexOf("Microsoft")!= -1) { return window[movieName]; } else { return document[movieName]; } } var data = { "title": "", "elements": [ { "type": "bar_glass", "values": [ { "top": 152, "colour": "#1f1b7c" }, { "top": 57, "colour": "#30d030" }, { "top": 133, "colour": "#db8a2b" }, { "top": 146, "colour": "#909090" } ], "colour": "#D54C78" } ], "bg_colour": "#FFFFFF", "x_axis": { "labels": { "steps": 1, "rotate": "vertical", "colour": "#000000", "labels": [ 'Nov - 09','Dic - 09','Ene - 10','Feb - 10' ] } }, "y_axis": { "min": 0, "max": 250, "steps": 50.555 } };