| 60 |
jpm |
1 |
<?php
|
|
|
2 |
require_once "../Pattern.class.php";
|
|
|
3 |
require_once "../Graph.class.php";
|
|
|
4 |
|
|
|
5 |
$graph = new Graph(300, 200);
|
|
|
6 |
|
|
|
7 |
$graph->title->set('Customized pattern 1');
|
|
|
8 |
$graph->title->setFont(new Tuffy(12));
|
|
|
9 |
|
|
|
10 |
$pattern = Pattern::get('BarDepth');
|
|
|
11 |
$pattern->setArgs(array(
|
|
|
12 |
'yForeground' => array(5, 3, 4, 7, 6, 5, 8, 4, 7, NULL, NULL),
|
|
|
13 |
'yBackground' => array(NULL, NULL, 4, 5, 6, 4, 2, 3, 7, 5, 4),
|
|
|
14 |
'colorForeground' => new Color(230, 230, 230),
|
|
|
15 |
'colorBackground' => new Color(250, 90, 90)
|
|
|
16 |
));
|
|
|
17 |
|
|
|
18 |
$group = $pattern->create();
|
|
|
19 |
$group->legend->setPosition(0.5, 0.78);
|
|
|
20 |
|
|
|
21 |
$graph->add($group);
|
|
|
22 |
$graph->draw();
|
|
|
23 |
|
|
|
24 |
?>
|