1 | <?php // content="text/plain; charset=utf-8"
|
---|
2 | require_once ('jpgraph/jpgraph.php');
|
---|
3 | require_once ('jpgraph/jpgraph_radar.php');
|
---|
4 |
|
---|
5 | $titles=array('Planning','Quality','Time','RR','CR','DR');
|
---|
6 | $data=array(18, 40, 70, 90, 42, 66);
|
---|
7 |
|
---|
8 | $n = count($data);
|
---|
9 | for( $i=0; $i < $n; ++$i ) {
|
---|
10 | $targets[$i] = "#$i";
|
---|
11 | $alts[$i] = "Data point #$i";
|
---|
12 | }
|
---|
13 |
|
---|
14 | $graph = new RadarGraph (300,280);
|
---|
15 |
|
---|
16 | $graph->title->Set('Radar with marks');
|
---|
17 | $graph->title->SetFont(FF_VERDANA,FS_BOLD,12);
|
---|
18 | $graph->title->SetMargin(10);
|
---|
19 |
|
---|
20 | $graph->SetTitles($titles);
|
---|
21 | $graph->SetCenter(0.5,0.55);
|
---|
22 | $graph->HideTickMarks();
|
---|
23 | $graph->SetColor('lightgreen@0.7');
|
---|
24 | $graph->axis->SetColor('darkgray');
|
---|
25 | $graph->grid->SetColor('darkgray');
|
---|
26 | $graph->grid->Show();
|
---|
27 |
|
---|
28 | $graph->axis->title->SetFont(FF_ARIAL,FS_NORMAL,12);
|
---|
29 | $graph->axis->title->SetMargin(5);
|
---|
30 | $graph->SetGridDepth(DEPTH_BACK);
|
---|
31 | $graph->SetSize(0.6);
|
---|
32 |
|
---|
33 | $plot = new RadarPlot($data);
|
---|
34 | $plot->SetColor('red@0.2');
|
---|
35 | $plot->SetLineWeight(2);
|
---|
36 | $plot->SetFillColor('red@0.7');
|
---|
37 | $plot->mark->SetType(MARK_IMG_DIAMOND,'red',0.6);
|
---|
38 | $plot->mark->SetFillColor('darkred');
|
---|
39 | $plot->SetCSIMTargets( $targets , $alts );
|
---|
40 |
|
---|
41 | $graph->Add($plot);
|
---|
42 | $graph->StrokeCSIM();
|
---|
43 | ?>
|
---|