summaryrefslogtreecommitdiffstats
path: root/docs/tutorial_example_14.php
blob: 8440d02d5f5f4428315d036432f00d0c25023f06 (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
<?php

require_once 'tutorial_autoload.php';
$wikidata = include 'tutorial_wikipedia_data.php';

$graph = new ezcGraphLineChart();
$graph->options->fillLines = 210;
$graph->options->font->maxFontSize = 10;
$graph->title = 'Error level colors';
$graph->legend = false;

$graph->yAxis = new ezcGraphChartElementLabeledAxis();
$graph->yAxis->axisLabelRenderer->showZeroValue = true;

$graph->yAxis->label = 'Color';
$graph->xAxis->label = 'Error level';

// Add data
$graph->data['colors'] = new ezcGraphArrayDataSet(
    array(
        'info' => 'blue',
        'notice' => 'green',
        'warning' => 'orange',
        'error' => 'red',
        'fatal' => 'red',
    )
);

$graph->render( 400, 150, 'tutorial_example_14.svg' );

?>
OpenPOWER on IntegriCloud