summaryrefslogtreecommitdiffstats
path: root/docs/tutorial_example_31.php
blob: ac3fcaa770e535b0f550b7378ab4940d37c03259 (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
<?php

require_once 'tutorial_autoload.php';

$graph = new ezcGraphLineChart();
$graph->title = 'Sinus';
$graph->legend->position = ezcGraph::BOTTOM;

$graph->xAxis = new ezcGraphChartElementNumericAxis();

$graph->data['sinus'] = new ezcGraphNumericDataSet( 
    -360, // Start value
    360,  // End value
    create_function(
        '$x',
        'return sin( deg2rad( $x ) );'
    )
);

$graph->data['sinus']->resolution = 120;

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

?>
OpenPOWER on IntegriCloud