Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/modules/Elezioni/grafici/barre.php

    r2 r22  
    99include ("jpgraph.php");
    1010include ("jpgraph_bar.php");
    11 
     11if(file_exists(TTF_DIR))
     12        define("CURFONT1",FF_DV_SANSSERIF);
     13else
     14        define ("CURFONT1",FF_FONT1);
    1215
    1316$dati1=$_GET['dati1'];$dati2=$_GET['dati2'];$i=$_GET['i'];$l=$_GET['l'];$w=$_GET['w'];
     
    4649// Setup title
    4750$graph->title->Set("$titolo");
    48 $graph->title->SetFont(FF_FONT1,FS_BOLD,10);
     51$graph->title->SetFont(CURFONT1,FS_BOLD,10);
    4952$graph->subtitle->Set("$descr");
    5053
    5154// Setup X-axis
    5255$graph->xaxis->SetTickLabels($datax);
    53 $graph->xaxis->SetFont(FF_FONT1,FS_BOLD,8);
     56$graph->xaxis->SetFont(CURFONT1,FS_BOLD,8);
    5457$graph->xaxis->SetColor("black","darkred");
    5558// Some extra margin looks nicer
     
    8891//$graph->yaxis->title->Align('center');
    8992
    90 $graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD,12);
     93$graph->yaxis->title->SetFont(CURFONT1,FS_BOLD,12);
    9194$graph->yaxis->title->SetAngle(0);
    9295
    9396
    9497
    95 $graph->yaxis->SetFont(FF_FONT2,FS_NORMAL);
     98$graph->yaxis->SetFont(CURFONT1,FS_NORMAL); #era FF_FONT2
    9699// If you want the labels at an angle other than 0 or 90
    97100// you need to use TTF fonts
     
    123126// We want to display the value of each bar at the top
    124127$bplot->value->Show();
    125 $bplot->value->SetFont(FF_FONT1,FS_BOLD,12);
     128$bplot->value->SetFont(CURFONT1,FS_BOLD,12);
    126129$bplot->value->SetAlign('left','center');
    127130$bplot->value->SetColor("black","darkred");
    128 $bplot->value->SetFormat('%.2f perc');
     131$bplot->value->SetFormat("%.2f %");
    129132
    130133// Add the bar to the graph
Note: See TracChangeset for help on using the changeset viewer.