brendon2020
[H]ard|Gawd
- Joined
- Dec 15, 2002
- Messages
- 1,541
i'm trying to display numbers and letters inside the graph with jpgraph. So i'm wondering if this can be done. For example, if the x-axis is 1-31 (days of month) and the y-axis is my data. Inside this set of numbers are letters standing for something. Like A for absent, so say on the 15th of august the child is absent. In the data will be an A on the 15th. The actual value of the A should be zero but i would like the A to be displayed. Thanks in advance. Here is the code i have so far,
PHP:
$graph = new Graph(500,300,"auto");
$graph->SetScale("textlin");
$graph->SetBox();
$graph->img->SetMargin(40,40,40,40);
$graph->SetShadow();
$graph->xaxis->title->Set("Days of the month");
$graph->yaxis->title->Set("Bic Frequency");
$graph->legend->SetFillColor("white");
$graph->legend->SetLineWeight(2);
$graph->xaxis->SetPos("min");
$graph->yaxis->SetLabelMargin(12);
$graph->xaxis->SetLabelMargin(6);
$graph->yaxis->SetTickSide(SIDE_LEFT);
$graph->xaxis->SetTickSide(SIDE_DOWN);
$graph->title->Set("For $LastName, $FirstName Target: $Target AVG: $average");
$graph->title->SetFont(FF_FONT1,FS_BOLD);
$sp1 = new LinePlot($ArrayX, $ArrayY);
$sp1->SetStyle("dotted");
$sp1->SetLegend("Graphs");
$graph->Add($sp1);
$graph->Stroke();