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