summaryrefslogtreecommitdiffstats
path: root/docs/tutorial/tutorial_dataset_numeric.php
blob: 1694cafc032fab82adca71046236783712508d33 (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_dataset_numeric.svg' );

?>
OpenPOWER on IntegriCloud