summaryrefslogtreecommitdiffstats
path: root/docs/tutorial/tutorial_axis_labeled.php
blob: 10419d87e2defac86e7cc3bb91a407d63d6dd8fe (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_axis_labeled.svg' );

?>
OpenPOWER on IntegriCloud