blob: cb0a6547bb7e05a98ba45892ddde6b6521844946 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<?php
require_once 'tutorial_autoload.php';
$graph = new ezcGraphOdometerChart();
$graph->title = 'Custom odometer';
$graph->data['data'] = new ezcGraphArrayDataSet(
array( 87 )
);
// Set the marker color
$graph->data['data']->color[0] = '#A0000055';
// Set colors for the background gradient
$graph->options->startColor = '#2E3436';
$graph->options->endColor = '#EEEEEC';
// Define a border for the odometer
$graph->options->borderWidth = 2;
$graph->options->borderColor = '#BABDB6';
// Set marker width
$graph->options->markerWidth = 5;
// Set space, which the odometer may consume
$graph->options->odometerHeight = .7;
// Set axis span and label
$graph->axis->min = 0;
$graph->axis->max = 100;
$graph->axis->label = 'Coverage ';
$graph->render( 400, 150, 'tutorial_custom_odometer_chart.svg' );
?>
|