par
Ish » 15 mai 2007, 18:13
j'avais déjà essayer mais ça n'avais rien fait ....
par contre je viens de fouiner dans la MEGA-doc en anglais 'monsieur' ....
donc il faut bien faire un include mais le probleme ne vient pas de là mais carrement de la pageoù j'initialise le graphique !!
Lorsque je fais un StrokeCSIM(), c'est que je m'attend à avoir une MAP et une image ... forcement dans mon cas la map ne passer pas !!
Donc le bon code est :
include ( "../jpgraph.php");
include ("../jpgraph_line.php");
// Some data
$ydata = array(8,3,16,2,"",25,16,3,6,9,16,20);
// Create the graph. These two calls are always required
$graph = new Graph(350, 250,"auto");
$graph->SetScale( "textlin");
//liste des liens
url1="http://www.free.fr";
$url2="http://127.0.0.1";
$url3="http://www.google.fr";
$url4="http://www.google.fr";
$url5="http://www.phpfrance.com";
$url6="http://www.google.fr";
$url7="http://www.google.fr";
$url8="http://www.google.fr";
$url9="http://www.google.fr";
$url10="http://www.google.fr";
$url11="http://www.google.fr";
$url12="http://www.google.fr";
$targetArray=array($url1, $url2, $url3, $url4, $url5, $url6, $url7, $url8, $url9, $url10, $url11, $url12);
$altArray=array("free","host","google","google","google","google","google","google","google","google","google","google",);
$bplot->SetCSIMTargets($targetArray,$altArray);
// Create the Bar plot
$bplot=new BarPlot($ydata);
$lbplot->SetColor("blue");
// Add the plot to the graph
$graph->Add( $bplot);
// Display the graph
$graph->Stroke("graphique_25.jpeg");
echo $graph ->GetHTMLImageMap ("graphique_25" );
echo "<img src=\"graphique_25.jpeg\" ISMAP USEMAP=\"#graphique_25\" border=0>" ;
puis d'appeler cette jolie page avec une include ... !!
...
<td> <? include ("test_graph.php"); ?< </td>
...
Et le tour est joué ....
Merci RYLE !!!!

j'avais déjà essayer mais ça n'avais rien fait ....
par contre je viens de fouiner dans la MEGA-doc en anglais 'monsieur' .... :lol:
donc il faut bien faire un include mais le probleme ne vient pas de là mais carrement de la pageoù j'initialise le graphique !!
Lorsque je fais un StrokeCSIM(), c'est que je m'attend à avoir une MAP et une image ... forcement dans mon cas la map ne passer pas !!
Donc le bon code est :
[php]
include ( "../jpgraph.php");
include ("../jpgraph_line.php");
// Some data
$ydata = array(8,3,16,2,"",25,16,3,6,9,16,20);
// Create the graph. These two calls are always required
$graph = new Graph(350, 250,"auto");
$graph->SetScale( "textlin");
//liste des liens
url1="http://www.free.fr";
$url2="http://127.0.0.1";
$url3="http://www.google.fr";
$url4="http://www.google.fr";
$url5="http://www.phpfrance.com";
$url6="http://www.google.fr";
$url7="http://www.google.fr";
$url8="http://www.google.fr";
$url9="http://www.google.fr";
$url10="http://www.google.fr";
$url11="http://www.google.fr";
$url12="http://www.google.fr";
$targetArray=array($url1, $url2, $url3, $url4, $url5, $url6, $url7, $url8, $url9, $url10, $url11, $url12);
$altArray=array("free","host","google","google","google","google","google","google","google","google","google","google",);
$bplot->SetCSIMTargets($targetArray,$altArray);
// Create the Bar plot
$bplot=new BarPlot($ydata);
$lbplot->SetColor("blue");
// Add the plot to the graph
$graph->Add( $bplot);
// Display the graph
$graph->Stroke("graphique_25.jpeg");
echo $graph ->GetHTMLImageMap ("graphique_25" );
echo "<img src=\"graphique_25.jpeg\" ISMAP USEMAP=\"#graphique_25\" border=0>" ;
[/php]
puis d'appeler cette jolie page avec une include ... !!
[php]
...
<td> <? include ("test_graph.php"); ?< </td>
...
[/php]
Et le tour est joué .... :wink:
Merci RYLE !!!! :D