summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-11-29 11:44:25 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-11-29 11:44:25 +0000
commitb258b0538e0b11e0ed8419035655f2e55e86a98c (patch)
tree00239e111309e549aa112206d9569e778fff5bef
parent1673ab83ff6be88690d4f1fb404d01058d181f4e (diff)
downloadzetacomponents-graph-b258b0538e0b11e0ed8419035655f2e55e86a98c.zip
zetacomponents-graph-b258b0538e0b11e0ed8419035655f2e55e86a98c.tar.gz
- Increased example numbers
-rw-r--r--docs/img/tutorial_example_25.svg.png (renamed from docs/img/tutorial_example_24.svg.png)bin72895 -> 72895 bytes
-rw-r--r--docs/img/tutorial_example_26.jpg (renamed from docs/img/tutorial_example_25.jpg)bin37275 -> 37275 bytes
-rw-r--r--docs/img/tutorial_example_27.swf (renamed from docs/img/tutorial_example_26.swf)bin35265 -> 35265 bytes
-rw-r--r--docs/img/tutorial_example_28.svg (renamed from docs/img/tutorial_example_27.svg)0
-rw-r--r--docs/img/tutorial_example_29.html (renamed from docs/img/tutorial_example_28.html)0
-rw-r--r--docs/img/tutorial_example_29.png (renamed from docs/img/tutorial_example_28.png)bin52161 -> 52161 bytes
-rw-r--r--docs/tutorial_example_24.php31
-rw-r--r--docs/tutorial_example_25.php22
-rw-r--r--docs/tutorial_example_26.php18
-rw-r--r--docs/tutorial_example_27.php52
-rw-r--r--docs/tutorial_example_28.php71
-rw-r--r--docs/tutorial_example_29.php58
12 files changed, 126 insertions, 126 deletions
diff --git a/docs/img/tutorial_example_24.svg.png b/docs/img/tutorial_example_25.svg.png
index 04427d4..04427d4 100644
--- a/docs/img/tutorial_example_24.svg.png
+++ b/docs/img/tutorial_example_25.svg.png
Binary files differ
diff --git a/docs/img/tutorial_example_25.jpg b/docs/img/tutorial_example_26.jpg
index 33e84d9..33e84d9 100644
--- a/docs/img/tutorial_example_25.jpg
+++ b/docs/img/tutorial_example_26.jpg
Binary files differ
diff --git a/docs/img/tutorial_example_26.swf b/docs/img/tutorial_example_27.swf
index 3dbb2e0..3dbb2e0 100644
--- a/docs/img/tutorial_example_26.swf
+++ b/docs/img/tutorial_example_27.swf
Binary files differ
diff --git a/docs/img/tutorial_example_27.svg b/docs/img/tutorial_example_28.svg
index 0967b19..0967b19 100644
--- a/docs/img/tutorial_example_27.svg
+++ b/docs/img/tutorial_example_28.svg
diff --git a/docs/img/tutorial_example_28.html b/docs/img/tutorial_example_29.html
index 92471dd..92471dd 100644
--- a/docs/img/tutorial_example_28.html
+++ b/docs/img/tutorial_example_29.html
diff --git a/docs/img/tutorial_example_28.png b/docs/img/tutorial_example_29.png
index 4ecaa52..4ecaa52 100644
--- a/docs/img/tutorial_example_28.png
+++ b/docs/img/tutorial_example_29.png
Binary files differ
diff --git a/docs/tutorial_example_24.php b/docs/tutorial_example_24.php
deleted file mode 100644
index bee8f6a..0000000
--- a/docs/tutorial_example_24.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-
-require_once 'tutorial_autoload.php';
-
-$graph = new ezcGraphPieChart();
-$graph->background->color = '#FFFFFFFF';
-$graph->title = 'Access statistics';
-$graph->legend = false;
-
-$graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
- 'Mozilla' => 19113,
- 'Explorer' => 10917,
- 'Opera' => 1464,
- 'Safari' => 652,
- 'Konqueror' => 474,
-) );
-
-$graph->renderer = new ezcGraphRenderer3d();
-$graph->renderer->options->pieChartShadowSize = 10;
-$graph->renderer->options->pieChartGleam = .5;
-$graph->renderer->options->dataBorder = false;
-$graph->renderer->options->pieChartHeight = 16;
-$graph->renderer->options->legendSymbolGleam = .5;
-
-$graph->driver->options->templateDocument = 'template.svg';
-$graph->driver->options->graphOffset = new ezcGraphCoordinate( 25, 40 );
-$graph->driver->options->insertIntoGroup = 'ezcGraph';
-
-$graph->render( 400, 200, 'tutorial_example_24.svg' );
-
-?>
diff --git a/docs/tutorial_example_25.php b/docs/tutorial_example_25.php
index 1f728e8..bee8f6a 100644
--- a/docs/tutorial_example_25.php
+++ b/docs/tutorial_example_25.php
@@ -3,17 +3,10 @@
require_once 'tutorial_autoload.php';
$graph = new ezcGraphPieChart();
-$graph->palette = new ezcGraphPaletteEzGreen();
+$graph->background->color = '#FFFFFFFF';
$graph->title = 'Access statistics';
$graph->legend = false;
-$graph->driver = new ezcGraphGdDriver();
-$graph->options->font = 'tutorial_font.ttf';
-
-$graph->driver->options->supersampling = 1;
-$graph->driver->options->jpegQuality = 100;
-$graph->driver->options->imageFormat = IMG_JPEG;
-
$graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
'Mozilla' => 19113,
'Explorer' => 10917,
@@ -22,6 +15,17 @@ $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
'Konqueror' => 474,
) );
-$graph->render( 400, 200, 'tutorial_example_25.jpg' );
+$graph->renderer = new ezcGraphRenderer3d();
+$graph->renderer->options->pieChartShadowSize = 10;
+$graph->renderer->options->pieChartGleam = .5;
+$graph->renderer->options->dataBorder = false;
+$graph->renderer->options->pieChartHeight = 16;
+$graph->renderer->options->legendSymbolGleam = .5;
+
+$graph->driver->options->templateDocument = 'template.svg';
+$graph->driver->options->graphOffset = new ezcGraphCoordinate( 25, 40 );
+$graph->driver->options->insertIntoGroup = 'ezcGraph';
+
+$graph->render( 400, 200, 'tutorial_example_24.svg' );
?>
diff --git a/docs/tutorial_example_26.php b/docs/tutorial_example_26.php
index 9bb9f50..1f728e8 100644
--- a/docs/tutorial_example_26.php
+++ b/docs/tutorial_example_26.php
@@ -3,13 +3,16 @@
require_once 'tutorial_autoload.php';
$graph = new ezcGraphPieChart();
+$graph->palette = new ezcGraphPaletteEzGreen();
$graph->title = 'Access statistics';
$graph->legend = false;
-$graph->driver = new ezcGraphMingDriver();
-$graph->options->font = 'tutorial_font.fdb';
+$graph->driver = new ezcGraphGdDriver();
+$graph->options->font = 'tutorial_font.ttf';
-$graph->driver->options->compression = 7;
+$graph->driver->options->supersampling = 1;
+$graph->driver->options->jpegQuality = 100;
+$graph->driver->options->imageFormat = IMG_JPEG;
$graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
'Mozilla' => 19113,
@@ -19,13 +22,6 @@ $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
'Konqueror' => 474,
) );
-$graph->renderer = new ezcGraphRenderer3d();
-$graph->renderer->options->pieChartShadowSize = 10;
-$graph->renderer->options->pieChartGleam = .5;
-$graph->renderer->options->dataBorder = false;
-$graph->renderer->options->pieChartHeight = 16;
-$graph->renderer->options->legendSymbolGleam = .5;
-
-$graph->render( 400, 200, 'tutorial_example_26.swf' );
+$graph->render( 400, 200, 'tutorial_example_25.jpg' );
?>
diff --git a/docs/tutorial_example_27.php b/docs/tutorial_example_27.php
index 4843b9b..9bb9f50 100644
--- a/docs/tutorial_example_27.php
+++ b/docs/tutorial_example_27.php
@@ -3,8 +3,13 @@
require_once 'tutorial_autoload.php';
$graph = new ezcGraphPieChart();
-$graph->palette = new ezcGraphPaletteEz();
$graph->title = 'Access statistics';
+$graph->legend = false;
+
+$graph->driver = new ezcGraphMingDriver();
+$graph->options->font = 'tutorial_font.fdb';
+
+$graph->driver->options->compression = 7;
$graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
'Mozilla' => 19113,
@@ -14,42 +19,13 @@ $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
'Konqueror' => 474,
) );
-$graph->render( 400, 200, 'tutorial_example_27.svg' );
-
-// Get element references from renderer
-$elements = $graph->renderer->getElementReferences();
-
-// Add links to charts
-$dom = new DOMDocument();
-$dom->load( 'tutorial_example_27.svg' );
-$xpath = new DomXPath( $dom );
-
-// Link chart elements
-foreach( $elements['data']['Access statistics'] as $objectName => $ids )
-{
- foreach( $ids as $id )
- {
- echo "Link: $id\n";
- $element = $xpath->query( '//*[@id = \'' . $id . '\']' )->item( 0 );
-
- $element->setAttribute( 'style', $element->getAttribute( 'style' ) . ' cursor: pointer;' );
- $element->setAttribute( 'onclick', 'top.location = \'/detailedData.php?browser=' . $objectName . '\'' );
- }
-}
-
-// Link legend elements
-foreach( $elements['legend'] as $objectName => $ids )
-{
- foreach( $ids as $id )
- {
- echo "Link: $id\n";
- $element = $xpath->query( '//*[@id = \'' . $id . '\']' )->item( 0 );
-
- $element->setAttribute( 'style', $element->getAttribute( 'style' ) . ' cursor: pointer;' );
- $element->setAttribute( 'onclick', 'top.location = \'/detailedData.php?browser=' . $objectName . '\'' );
- }
-}
-
-$dom->save( 'tutorial_example_27.svg' );
+$graph->renderer = new ezcGraphRenderer3d();
+$graph->renderer->options->pieChartShadowSize = 10;
+$graph->renderer->options->pieChartGleam = .5;
+$graph->renderer->options->dataBorder = false;
+$graph->renderer->options->pieChartHeight = 16;
+$graph->renderer->options->legendSymbolGleam = .5;
+
+$graph->render( 400, 200, 'tutorial_example_26.swf' );
?>
diff --git a/docs/tutorial_example_28.php b/docs/tutorial_example_28.php
index bc1920d..4843b9b 100644
--- a/docs/tutorial_example_28.php
+++ b/docs/tutorial_example_28.php
@@ -3,12 +3,9 @@
require_once 'tutorial_autoload.php';
$graph = new ezcGraphPieChart();
-$graph->palette = new ezcGraphPaletteEzGreen();
+$graph->palette = new ezcGraphPaletteEz();
$graph->title = 'Access statistics';
-$graph->driver = new ezcGraphGdDriver();
-$graph->options->font = 'tutorial_font.ttf';
-
$graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
'Mozilla' => 19113,
'Explorer' => 10917,
@@ -17,42 +14,42 @@ $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
'Konqueror' => 474,
) );
-$graph->render( 400, 200, 'tutorial_example_28.png' );
+$graph->render( 400, 200, 'tutorial_example_27.svg' );
+// Get element references from renderer
$elements = $graph->renderer->getElementReferences();
-?>
-<html>
- <head><title>Image map example</title></head>
- <body>
- <map
- name="ezcGraphPieChartMap">
-<?php
- foreach ( $elements['legend'] as $objectName => $polygones )
+// Add links to charts
+$dom = new DOMDocument();
+$dom->load( 'tutorial_example_27.svg' );
+$xpath = new DomXPath( $dom );
+
+// Link chart elements
+foreach( $elements['data']['Access statistics'] as $objectName => $ids )
+{
+ foreach( $ids as $id )
{
- foreach ( $polygones as $shape => $polygone )
- {
- $coordinateString = '';
- foreach( $polygone as $coordinate )
- {
- $coordinateString .= sprintf( '%d,%d,', $coordinate->x, $coordinate->y );
- }
-
- printf( "<area shape=\"poly\" coords=\"%s\" href=\"/detailedData.php?browser=%s\" alt=\"%s: %s\" title=\"%s: %s\" />\n",
- substr( $coordinateString, 0, -1 ),
- $objectName,
- $shape, $objectName,
- $shape, $objectName
- );
- }
+ echo "Link: $id\n";
+ $element = $xpath->query( '//*[@id = \'' . $id . '\']' )->item( 0 );
+
+ $element->setAttribute( 'style', $element->getAttribute( 'style' ) . ' cursor: pointer;' );
+ $element->setAttribute( 'onclick', 'top.location = \'/detailedData.php?browser=' . $objectName . '\'' );
}
-?>
- </map>
- <img
- src="tutorial_example_28.png"
- width="400" height="200"
- usemap="#ezcGraphPieChartMap"
- </body>
-</html>
-<?php
+}
+
+// Link legend elements
+foreach( $elements['legend'] as $objectName => $ids )
+{
+ foreach( $ids as $id )
+ {
+ echo "Link: $id\n";
+ $element = $xpath->query( '//*[@id = \'' . $id . '\']' )->item( 0 );
+
+ $element->setAttribute( 'style', $element->getAttribute( 'style' ) . ' cursor: pointer;' );
+ $element->setAttribute( 'onclick', 'top.location = \'/detailedData.php?browser=' . $objectName . '\'' );
+ }
+}
+
+$dom->save( 'tutorial_example_27.svg' );
+
?>
diff --git a/docs/tutorial_example_29.php b/docs/tutorial_example_29.php
new file mode 100644
index 0000000..bc1920d
--- /dev/null
+++ b/docs/tutorial_example_29.php
@@ -0,0 +1,58 @@
+<?php
+
+require_once 'tutorial_autoload.php';
+
+$graph = new ezcGraphPieChart();
+$graph->palette = new ezcGraphPaletteEzGreen();
+$graph->title = 'Access statistics';
+
+$graph->driver = new ezcGraphGdDriver();
+$graph->options->font = 'tutorial_font.ttf';
+
+$graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
+ 'Mozilla' => 19113,
+ 'Explorer' => 10917,
+ 'Opera' => 1464,
+ 'Safari' => 652,
+ 'Konqueror' => 474,
+) );
+
+$graph->render( 400, 200, 'tutorial_example_28.png' );
+
+$elements = $graph->renderer->getElementReferences();
+
+?>
+<html>
+ <head><title>Image map example</title></head>
+ <body>
+ <map
+ name="ezcGraphPieChartMap">
+<?php
+ foreach ( $elements['legend'] as $objectName => $polygones )
+ {
+ foreach ( $polygones as $shape => $polygone )
+ {
+ $coordinateString = '';
+ foreach( $polygone as $coordinate )
+ {
+ $coordinateString .= sprintf( '%d,%d,', $coordinate->x, $coordinate->y );
+ }
+
+ printf( "<area shape=\"poly\" coords=\"%s\" href=\"/detailedData.php?browser=%s\" alt=\"%s: %s\" title=\"%s: %s\" />\n",
+ substr( $coordinateString, 0, -1 ),
+ $objectName,
+ $shape, $objectName,
+ $shape, $objectName
+ );
+ }
+ }
+?>
+ </map>
+ <img
+ src="tutorial_example_28.png"
+ width="400" height="200"
+ usemap="#ezcGraphPieChartMap"
+ </body>
+</html>
+<?php
+?>
OpenPOWER on IntegriCloud