Ignore:
File:
1 edited

Legend:

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

    r22 r2  
    99include ("jpgraph.php");
    1010include ("jpgraph_bar.php");
    11 if(file_exists(TTF_DIR))
    12         define("CURFONT1",FF_DV_SANSSERIF);
    13 else
    14         define ("CURFONT1",FF_FONT1);
     11
    1512
    1613$dati1=$_GET['dati1'];$dati2=$_GET['dati2'];$i=$_GET['i'];$l=$_GET['l'];$w=$_GET['w'];
     
    4946// Setup title
    5047$graph->title->Set("$titolo");
    51 $graph->title->SetFont(CURFONT1,FS_BOLD,10);
     48$graph->title->SetFont(FF_FONT1,FS_BOLD,10);
    5249$graph->subtitle->Set("$descr");
    5350
    5451// Setup X-axis
    5552$graph->xaxis->SetTickLabels($datax);
    56 $graph->xaxis->SetFont(CURFONT1,FS_BOLD,8);
     53$graph->xaxis->SetFont(FF_FONT1,FS_BOLD,8);
    5754$graph->xaxis->SetColor("black","darkred");
    5855// Some extra margin looks nicer
     
    9188//$graph->yaxis->title->Align('center');
    9289
    93 $graph->yaxis->title->SetFont(CURFONT1,FS_BOLD,12);
     90$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD,12);
    9491$graph->yaxis->title->SetAngle(0);
    9592
    9693
    9794
    98 $graph->yaxis->SetFont(CURFONT1,FS_NORMAL); #era FF_FONT2
     95$graph->yaxis->SetFont(FF_FONT2,FS_NORMAL);
    9996// If you want the labels at an angle other than 0 or 90
    10097// you need to use TTF fonts
     
    126123// We want to display the value of each bar at the top
    127124$bplot->value->Show();
    128 $bplot->value->SetFont(CURFONT1,FS_BOLD,12);
     125$bplot->value->SetFont(FF_FONT1,FS_BOLD,12);
    129126$bplot->value->SetAlign('left','center');
    130127$bplot->value->SetColor("black","darkred");
    131 $bplot->value->SetFormat("%.2f %");
     128$bplot->value->SetFormat('%.2f perc');
    132129
    133130// Add the bar to the graph
Note: See TracChangeset for help on using the changeset viewer.