summaryrefslogtreecommitdiffstats
path: root/docs/tutorial/tutorial_axis_datetime.php
diff options
context:
space:
mode:
Diffstat (limited to 'docs/tutorial/tutorial_axis_datetime.php')
-rw-r--r--docs/tutorial/tutorial_axis_datetime.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/docs/tutorial/tutorial_axis_datetime.php b/docs/tutorial/tutorial_axis_datetime.php
new file mode 100644
index 0000000..a638d20
--- /dev/null
+++ b/docs/tutorial/tutorial_axis_datetime.php
@@ -0,0 +1,33 @@
+<?php
+
+require_once 'tutorial_autoload.php';
+
+$graph = new ezcGraphLineChart();
+$graph->options->fillLines = 210;
+$graph->title = 'Concurrent requests';
+$graph->legend = false;
+
+$graph->xAxis = new ezcGraphChartElementDateAxis();
+
+// Add data
+$graph->data['Machine 1'] = new ezcGraphArrayDataSet( array(
+ '8:00' => 3241,
+ '8:13' => 934,
+ '8:24' => 1201,
+ '8:27' => 1752,
+ '8:51' => 123,
+) );
+$graph->data['Machine 2'] = new ezcGraphArrayDataSet( array(
+ '8:05' => 623,
+ '8:12' => 2103,
+ '8:33' => 543,
+ '8:43' => 2034,
+ '8:59' => 3410,
+) );
+
+$graph->data['Machine 1']->symbol = ezcGraph::BULLET;
+$graph->data['Machine 2']->symbol = ezcGraph::BULLET;
+
+$graph->render( 400, 150, 'tutorial_axis_datetime.svg' );
+
+?>
OpenPOWER on IntegriCloud