Bonjour ,
Avec deux graphes , je n'arrive pas à garder que une seule graduation :
JpGraph avec des exemples multiples ne m'aide pas beaucoup !
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 // Create a graph instance $graph = new Graph($width,$height); $graph->SetScale("textlin"); $graph->SetY2Scale("lin"); $graph->SetShadow(); $graph->title->Set($subtitle); // Create the two linear plot $lineplot=new LinePlot($ydata); $lineplot2=new LinePlot($ydata2); // Add the plot to the graph $graph->Add($lineplot); $graph->AddY2($lineplot2); $lineplot2->SetColor("orange"); $lineplot2->SetWeight(4); $lineplot->SetColor("blue"); $lineplot->SetWeight(4); // Adjust the axis color $graph->yaxis->SetColor("blue"); // Set the legends for the plots $lineplot->SetLegend("Moyenne"); $lineplot2->SetLegend("Minimum"); // Display the graph $graph->Stroke();
Partager