Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 562ff11efeeb995695bd63e38997c454 > files > 81

ezcomponents-Graph-1.5-2.mga3.noarch.rpm

<?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' );

?>