- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/modules/Elezioni/grafici/barre.php
r2 r22 9 9 include ("jpgraph.php"); 10 10 include ("jpgraph_bar.php"); 11 11 if(file_exists(TTF_DIR)) 12 define("CURFONT1",FF_DV_SANSSERIF); 13 else 14 define ("CURFONT1",FF_FONT1); 12 15 13 16 $dati1=$_GET['dati1'];$dati2=$_GET['dati2'];$i=$_GET['i'];$l=$_GET['l'];$w=$_GET['w']; … … 46 49 // Setup title 47 50 $graph->title->Set("$titolo"); 48 $graph->title->SetFont( FF_FONT1,FS_BOLD,10);51 $graph->title->SetFont(CURFONT1,FS_BOLD,10); 49 52 $graph->subtitle->Set("$descr"); 50 53 51 54 // Setup X-axis 52 55 $graph->xaxis->SetTickLabels($datax); 53 $graph->xaxis->SetFont( FF_FONT1,FS_BOLD,8);56 $graph->xaxis->SetFont(CURFONT1,FS_BOLD,8); 54 57 $graph->xaxis->SetColor("black","darkred"); 55 58 // Some extra margin looks nicer … … 88 91 //$graph->yaxis->title->Align('center'); 89 92 90 $graph->yaxis->title->SetFont( FF_FONT1,FS_BOLD,12);93 $graph->yaxis->title->SetFont(CURFONT1,FS_BOLD,12); 91 94 $graph->yaxis->title->SetAngle(0); 92 95 93 96 94 97 95 $graph->yaxis->SetFont( FF_FONT2,FS_NORMAL);98 $graph->yaxis->SetFont(CURFONT1,FS_NORMAL); #era FF_FONT2 96 99 // If you want the labels at an angle other than 0 or 90 97 100 // you need to use TTF fonts … … 123 126 // We want to display the value of each bar at the top 124 127 $bplot->value->Show(); 125 $bplot->value->SetFont( FF_FONT1,FS_BOLD,12);128 $bplot->value->SetFont(CURFONT1,FS_BOLD,12); 126 129 $bplot->value->SetAlign('left','center'); 127 130 $bplot->value->SetColor("black","darkred"); 128 $bplot->value->SetFormat( '%.2f perc');131 $bplot->value->SetFormat("%.2f %"); 129 132 130 133 // Add the bar to the graph
Note:
See TracChangeset
for help on using the changeset viewer.