/[cvs.andrew.net.au]/stock/makechart.php
ViewVC logotype

Contents of /stock/makechart.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (vendor branch)
Thu Mar 14 13:23:57 2002 UTC (22 years, 6 months ago) by apollock
Branch: MAIN, stock
CVS Tags: start, HEAD
Changes since 1.1: +0 -0 lines
Imported sources

1 <?php
2 include("/usr/local/share/jpgraph/jpgraph.php");
3 include("/usr/local/share/jpgraph/jpgraph_line.php");
4 include_once("inc/GetName.inc");
5 include_once("inc/GetCodeForStock.inc");
6 include_once("inc/GetLastPrices.inc");
7 include_once("inc/GetLastPriceDates.inc");
8
9 $ydata = getLastPrices($code,10);
10 $xdata = getLastPriceDates($code,10);
11
12 //var_dump($xdata);
13
14 $graph = new Graph(320,240);
15 $graph->SetScale("textlin");
16 $graph->img->SetMargin(30,90,40,50);
17
18 $graph->xaxis->SetFont(FF_FONT1,FS_BOLD);
19 $graph->xaxis->SetTickLabels($xdata);
20 $graph->xaxis->SetLabelAngle(90);
21
22 $graph->yscale->SetAutoMin(0);
23
24 $graph->title->set(getName($code));
25
26 $lineplot = new LinePlot($ydata);
27 $lineplot->SetLegend("cents");
28 $lineplot->SetColor("blue");
29
30 $graph->Add($lineplot);
31
32 $graph->Stroke();
33 ?>

  ViewVC Help
Powered by ViewVC 1.1.22