Yo desde javascript llamo al fichero de la siguiente forma:
Código HTML:
<script type="text/javascript" src="js/swfobject.js"></script> <script type="text/javascript"> swfobject.embedSWF( "open-flash-chart.swf", "my_chart", "550", "200", "9.0.0", "expressInstall.swf", {"data-file":"horizontal-bar-chart.php"} ); </script>
Para ver los cambios tengo que llamar desde el explorer al fichero que genera el json "horizontal-bar-chart.php".
Alguie me podria decir como forzar a javascript para que cuando llame al "horizontal-bar-chart.php" se actualice?
Un saludo.
horizontal-bar-chart.php
Código PHP:
<?php
include_once 'php-ofc-library/open-flash-chart.php';
/*$y->set_labels( array( "Presupuesto","Diseño","Programación"));
$x_labels = array('10%','20%','30%','40%','50%','60%','70%','80%','90%','100%','120%','130%');
$title = new title( "Progreso de su proyect33" );
*/
//$x_labels = array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
$x_labels = array('0%','10%','20%','30%','40%','50%','60%','70%','80%','90%','100%','',);
$title = new title( "Our New House Schedule" );
$hbar = new hbar('#86BBEF');
$hbar->set_tooltip(' #val# %' );
$hbar->append_value(new hbar_value(0,4));
$hbar->append_value(new hbar_value(4,8));
$h = new hbar_value(0,11);
//$h->set_tooltip( "#left# toooooooooooooooo #right#<br>{$x_labels[8]} to {$x_labels[11]} (#val# months)" );
$hbar->append_value( $h );
$chart = new open_flash_chart();
$chart->set_title( $title );
$chart->add_element( $hbar );
$x = new x_axis();
$x->set_offset( false );
$x->set_labels_from_array( $x_labels );
$chart->set_x_axis( $x );
$y = new y_axis();
$y->set_offset( true );
$y->set_labels( array( "Make garden look sexy","Paint house","Move into house" ) );
$chart->add_y_axis( $y );
echo $chart->toPrettyString();
?>