~pablocapeluto/cds-php/devel-3.1

« back to all changes in this revision

Viewing changes to jpgraph/src/Examples/barpatternex1.php

  • Committer: pcapeluto at gmail
  • Date: 2010-08-20 17:51:08 UTC
  • Revision ID: pcapeluto@gmail.com-20100820175108-jyi8dbyj15uy9p4i
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
include ("../jpgraph.php");
 
4
include ("../jpgraph_bar.php");
 
5
include ("../jpgraph_line.php");
 
6
 
 
7
$datay=array(2,3,5,8.5,11.5,6,3);
 
8
 
 
9
// Create the graph. 
 
10
$graph = new Graph(350,300);    
 
11
 
 
12
$graph->SetScale("textlin");
 
13
 
 
14
$graph->SetMarginColor('navy:1.9');
 
15
$graph->SetBox();
 
16
 
 
17
$graph->title->Set('Bar Pattern');
 
18
$graph->title->SetFont(FF_ARIAL,FS_BOLD,20);
 
19
 
 
20
$graph->SetTitleBackground('lightblue:1.3',TITLEBKG_STYLE2,TITLEBKG_FRAME_BEVEL);
 
21
$graph->SetTitleBackgroundFillStyle(TITLEBKG_FILLSTYLE_HSTRIPED,'lightblue','blue');
 
22
 
 
23
// Create a bar pot
 
24
$bplot = new BarPlot($datay);
 
25
$bplot->SetFillColor('darkorange');
 
26
$bplot->SetWidth(0.6);
 
27
 
 
28
$bplot->SetPattern(PATTERN_CROSS1,'navy');
 
29
 
 
30
$graph->Add($bplot);
 
31
 
 
32
$graph->Stroke();
 
33
?>