Line | |
---|
1 | <?php
|
---|
2 | require_once ('jpgraph/jpgraph.php');
|
---|
3 | require_once ('jpgraph/jpgraph_odo.php');
|
---|
4 |
|
---|
5 | // Create a new odometer graph (width=250, height=200 pixels)
|
---|
6 | $graph = new OdoGraph(250,140);
|
---|
7 |
|
---|
8 | // Now we need to create an odometer to add to the graph.
|
---|
9 | // By default the scale will be 0 to 100
|
---|
10 | $odo = new Odometer(ODO_FULL);
|
---|
11 |
|
---|
12 | // Set display value for the odometer
|
---|
13 | $odo->needle->Set(30);
|
---|
14 |
|
---|
15 | // Add the odometer to the graph
|
---|
16 | $graph->Add($odo);
|
---|
17 |
|
---|
18 | // ... and finally stroke and stream the image back to the client
|
---|
19 | $graph->Stroke();
|
---|
20 |
|
---|
21 | ?>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.