summaryrefslogtreecommitdiffstats
path: root/src/driver/svg.php
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-09-12 14:17:01 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-09-12 14:17:01 +0000
commitb0e9cc69579d23ee01f9c98c2d8c508a244b8e5b (patch)
tree7cd5c10ce9bbcf6052077d083fbf19d38482ef24 /src/driver/svg.php
parenta5d1b634ae6a69a57391695f020f3c7a742a24ac (diff)
downloadzetacomponents-graph-b0e9cc69579d23ee01f9c98c2d8c508a244b8e5b.zip
zetacomponents-graph-b0e9cc69579d23ee01f9c98c2d8c508a244b8e5b.tar.gz
- Made id prefix for svg elements customizeable
# This changes again all svg documents, because I added the missing prefix to # the group element.
Diffstat (limited to 'src/driver/svg.php')
-rw-r--r--src/driver/svg.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/driver/svg.php b/src/driver/svg.php
index b7de230..bcdd1a2 100644
--- a/src/driver/svg.php
+++ b/src/driver/svg.php
@@ -89,7 +89,7 @@ class ezcGraphSvgDriver extends ezcGraphDriver
$svg->setAttribute( 'width', $this->options->width );
$svg->setAttribute( 'height', $this->options->height );
$svg->setAttribute( 'version', '1.0' );
- $svg->setAttribute( 'id', 'ezcGraph' );
+ $svg->setAttribute( 'id', $this->options->idPrefix );
$this->defs = $this->dom->createElement( 'defs' );
$this->defs = $svg->appendChild( $this->defs );
@@ -109,7 +109,7 @@ class ezcGraphSvgDriver extends ezcGraphDriver
else
{
$this->elements = $this->dom->createElement( 'g' );
- $this->elements->setAttribute( 'id', 'chart' );
+ $this->elements->setAttribute( 'id', $this->options->idPrefix . 'Chart' );
$this->elements->setAttribute( 'color-rendering', $this->options->colorRendering );
$this->elements->setAttribute( 'shape-rendering', $this->options->shapeRendering );
$this->elements->setAttribute( 'text-rendering', $this->options->textRendering );
@@ -304,7 +304,7 @@ class ezcGraphSvgDriver extends ezcGraphDriver
'style',
$this->getStyle( $color, $filled, $thickness )
);
- $path->setAttribute( 'id', $id = ( 'ezcGraphPolygon_' . ++$this->elementID ) );
+ $path->setAttribute( 'id', $id = ( $this->options->idPrefix . 'Polygon_' . ++$this->elementID ) );
$this->elements->appendChild( $path );
return $id;
@@ -336,7 +336,7 @@ class ezcGraphSvgDriver extends ezcGraphDriver
$this->getStyle( $color, false, $thickness )
);
- $path->setAttribute( 'id', $id = ( 'ezcGraphLine_' . ++$this->elementID ) );
+ $path->setAttribute( 'id', $id = ( $this->options->idPrefix . 'Line_' . ++$this->elementID ) );
$this->elements->appendChild( $path );
return $id;
@@ -423,7 +423,7 @@ class ezcGraphSvgDriver extends ezcGraphDriver
$this->options->font->minimalUsedFont = $size;
$this->strings[] = array(
'text' => $result,
- 'id' => $id = ( 'ezcGraphTextBox_' . ++$this->elementID ),
+ 'id' => $id = ( $this->options->idPrefix . 'TextBox_' . ++$this->elementID ),
'position' => $position,
'width' => $width,
'height' => $height,
@@ -563,7 +563,7 @@ class ezcGraphSvgDriver extends ezcGraphDriver
$this->getStyle( $color, $filled, 1 )
);
- $arc->setAttribute( 'id', $id = ( 'ezcGraphCircleSector_' . ++$this->elementID ) );
+ $arc->setAttribute( 'id', $id = ( $this->options->idPrefix . 'CircleSector_' . ++$this->elementID ) );
$this->elements->appendChild( $arc );
return $id;
@@ -661,7 +661,7 @@ class ezcGraphSvgDriver extends ezcGraphDriver
$this->getStyle( $color, $filled )
);
- $arc->setAttribute( 'id', $id = ( 'ezcGraphCircularArc_' . ++$this->elementID ) );
+ $arc->setAttribute( 'id', $id = ( $this->options->idPrefix . 'CircularArc_' . ++$this->elementID ) );
$this->elements->appendChild( $arc );
if ( ( $this->options->shadeCircularArc !== false ) &&
@@ -738,7 +738,7 @@ class ezcGraphSvgDriver extends ezcGraphDriver
$this->getStyle( $color, $filled, 1 )
);
- $ellipse->setAttribute( 'id', $id = ( 'ezcGraphCircle_' . ++$this->elementID ) );
+ $ellipse->setAttribute( 'id', $id = ( $this->options->idPrefix . 'Circle_' . ++$this->elementID ) );
$this->elements->appendChild( $ellipse );
return $id;
@@ -774,7 +774,7 @@ class ezcGraphSvgDriver extends ezcGraphDriver
);
$this->elements->appendChild( $image );
- $image->setAttribute( 'id', $id = ( 'ezcGraphImage_' . ++$this->elementID ) );
+ $image->setAttribute( 'id', $id = ( $this->options->idPrefix . 'Image_' . ++$this->elementID ) );
return $id;
}
OpenPOWER on IntegriCloud