<?php
require_once ('jpgraph/jpgraph.php');
require_once ('jpgraph/jpgraph_windrose.php');
 
$data = array(
    '45.9' => array(3,2,1,2,2),
    355 => array(1,1,1.5,2),
    180 => array(1,1,1.5,2),
    150 => array(1,2,1,3),
    'S' => array(2,3,5,1),
    );
 
$labels = array(355=>"At\nHome base",180=>"Probe\n123",150=>"Power\nplant");
 
$axiscolors = array(355=>"red");
$axisweights = array(355=>8);
$axisstyles = array(355=>'solid',150=>'solid');
 
$graph = new WindroseGraph(400,460);
$graph->title->Set('Adding label backgrounds');
$graph->title->SetFont(FF_VERDANA,FS_BOLD,14);
$graph->title->SetColor('navy');
 
$wp = new WindrosePlot($data);
$wp->SetType(WINDROSE_TYPEFREE);
$wp->scale->SetLabelFillColor('lightblue','black');
 
$wp->SetRadialColors($axiscolors);
$wp->SetRadialWeights($axisweights);
$wp->SetRadialStyles($axisstyles);
 
$wp->SetLabels($labels);
 
$wp->scale->SetZeroLabel("SOx\n8%%");
 
$graph->Add($wp);
$graph->Stroke();
?> |