Author: kn
Date: Wed Aug 8 08:55:13 2007
New Revision: 5842
Log:
- Fixed bug #11235: In interactive 3d bar charts circle and bullet bars are not
linked.
# Numeric part of IDs in SVG files changed because one element missed an ID
# Also ensured mimetype 'application/octet-stream' for all SVG test files
Added:
trunk/Graph/tests/data/compare/ezcGraphToolsTest_test3dBarChartSvgLinking.svg
(with props)
Modified:
trunk/Graph/ChangeLog
trunk/Graph/src/driver/svg.php
trunk/Graph/tests/data/compare/empty.svg (props changed)
trunk/Graph/tests/data/compare/ezcGraphBackgroundTest_testRenderPieChartWithBackgroundBorder.svg
(props changed)
trunk/Graph/tests/data/compare/ezcGraphBackgroundTest_testRenderPieChartWithBackgroundBorderAll.svg
(props changed)
trunk/Graph/tests/data/compare/ezcGraphBackgroundTest_testRenderPieChartWithBackgroundBorderAndMargin.svg
(props changed)
trunk/Graph/tests/data/compare/ezcGraphBackgroundTest_testRenderPieChartWithBackgroundBorderAndPadding.svg
(props changed)
trunk/Graph/tests/data/compare/ezcGraphBackgroundTest_testRenderPieChartWithBackgroundBottomCenter.svg
trunk/Graph/tests/data/compare/ezcGraphBackgroundTest_testRenderPieChartWithBigBackgroundBorder.svg
(props changed)
trunk/Graph/tests/data/compare/ezcGraphBackgroundTest_testRenderPieChartWithHorizontalTextureBackground.svg
trunk/Graph/tests/data/compare/ezcGraphChartTest_testCustomChartClass.svg
trunk/Graph/tests/data/compare/ezcGraphPieChartTest_testRender3dPieChartWithOneDataPoint.svg
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderBarChartSymbols.svg
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderFullShadow.svg
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieChartBlue.svg
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieChartEz.svg
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegment.svg
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegmentPolygonOrder.svg
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegmentWithCustomHeight.svg
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegmentWithCustomRotation.svg
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegmentWithGleamAndShadow.svg
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegmentWithIncreasedMoveOut.svg
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegmentWithModifiedSymbolColor.svg
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegmentWithTitle.svg
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegmentWithoutDataBorder.svg
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegmentWithoutSymbols.svg
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderNegativeBarChartSymbols.svg
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderPieChartWithLotsOfLabels.svg
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderPieChartWithOffset.svg
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderPimpedBarChart.svg
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderer3dPieChartMissingLabels.svg
trunk/Graph/tests/data/compare/ezcGraphSvgDriverTest_testDrawChartInTemplate.svg
trunk/Graph/tests/data/compare/ezcGraphSvgDriverTest_testDrawChartInTemplateCustomGroup.svg
trunk/Graph/tests/data/compare/ezcGraphSvgDriverTest_testDrawChartWithCustomPrefix.svg
trunk/Graph/tests/data/compare/ezcGraphSvgDriverTest_testDrawCircularArcAcute.svg
trunk/Graph/tests/data/compare/ezcGraphSvgDriverTest_testDrawCircularArcAcuteReverse.svg
trunk/Graph/tests/data/compare/ezcGraphSvgDriverTest_testDrawCircularArcObtuse.svg
trunk/Graph/tests/data/compare/ezcGraphSvgDriverTest_testDrawPolygonThreePointsNotFilledReverse.svg
(props changed)
trunk/Graph/tests/data/compare/ezcGraphSvgDriverTest_testSvgWithDifferentLocales.svg
trunk/Graph/tests/driver_svg_test.php
trunk/Graph/tests/image_map_test.php
trunk/Graph/tests/tools_test.php
Modified: trunk/Graph/ChangeLog
==============================================================================
--- trunk/Graph/ChangeLog [iso-8859-1] (original)
+++ trunk/Graph/ChangeLog [iso-8859-1] Wed Aug 8 08:55:13 2007
@@ -1,17 +1,19 @@
1.1.1 - [RELEASEDATE]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-- Fixed bug #11107: Floating point inaccuracies caused missing grid in line
+- Fixed issue #11107: Floating point inaccuracies caused missing grid in line
chart
-- Fixed bug #11207: Missing URL property for legend, or missing legend, may
+- Fixed issue #11207: Missing URL property for legend, or missing legend, may
cause PHP notice
-- Fixed bug #11157: Wrong display of single record with labeled axis
-- Fixed bug #11180: Color Palette: $dataSetColor in ezcGraphPalette starts
+- Fixed issue #11157: Wrong display of single record with labeled axis
+- Fixed issue #11180: Color Palette: $dataSetColor in ezcGraphPalette starts
with index 1 and not zero in pie charts
-- Fixed bug #11233: Path for circular arcs in SVG driver may break because of
- locale settings
-- Fixed bug #11236: Legend is not properly linked in interactive 3d line and
+- Fixed issue #11233: Path for circular arcs in SVG driver may break because
+ of locale settings
+- Fixed issue #11236: Legend is not properly linked in interactive 3d line and
bar charts.
+- Fixed issue #11235: In interactive 3d bar charts circle and bullet bars are
+ not linked.
1.1 - Monday 02 July 2007
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Modified: trunk/Graph/src/driver/svg.php
==============================================================================
--- trunk/Graph/src/driver/svg.php [iso-8859-1] (original)
+++ trunk/Graph/src/driver/svg.php [iso-8859-1] Wed Aug 8 08:55:13 2007
@@ -1034,6 +1034,7 @@
'style',
$this->getStyle( $gradient, $filled )
);
+ $arc->setAttribute( 'id', $id = ( $this->options->idPrefix .
'CircularArc_' . ++$this->elementID ) );
$this->elements->appendChild( $arc );
}
Propchange: trunk/Graph/tests/data/compare/empty.svg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Propchange:
trunk/Graph/tests/data/compare/ezcGraphBackgroundTest_testRenderPieChartWithBackgroundBorder.svg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Propchange:
trunk/Graph/tests/data/compare/ezcGraphBackgroundTest_testRenderPieChartWithBackgroundBorderAll.svg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Propchange:
trunk/Graph/tests/data/compare/ezcGraphBackgroundTest_testRenderPieChartWithBackgroundBorderAndMargin.svg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Propchange:
trunk/Graph/tests/data/compare/ezcGraphBackgroundTest_testRenderPieChartWithBackgroundBorderAndPadding.svg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified:
trunk/Graph/tests/data/compare/ezcGraphBackgroundTest_testRenderPieChartWithBackgroundBottomCenter.svg
==============================================================================
Binary files - no diff available.
Propchange:
trunk/Graph/tests/data/compare/ezcGraphBackgroundTest_testRenderPieChartWithBigBackgroundBorder.svg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified:
trunk/Graph/tests/data/compare/ezcGraphBackgroundTest_testRenderPieChartWithHorizontalTextureBackground.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphChartTest_testCustomChartClass.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphPieChartTest_testRender3dPieChartWithOneDataPoint.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderBarChartSymbols.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderFullShadow.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieChartBlue.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieChartEz.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegment.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegmentPolygonOrder.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegmentWithCustomHeight.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegmentWithCustomRotation.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegmentWithGleamAndShadow.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegmentWithIncreasedMoveOut.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegmentWithModifiedSymbolColor.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegmentWithTitle.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegmentWithoutDataBorder.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegmentWithoutSymbols.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderNegativeBarChartSymbols.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderPieChartWithLotsOfLabels.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderPieChartWithOffset.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderPimpedBarChart.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderer3dPieChartMissingLabels.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphSvgDriverTest_testDrawChartInTemplate.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphSvgDriverTest_testDrawChartInTemplateCustomGroup.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphSvgDriverTest_testDrawChartWithCustomPrefix.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphSvgDriverTest_testDrawCircularArcAcute.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphSvgDriverTest_testDrawCircularArcAcuteReverse.svg
==============================================================================
Binary files - no diff available.
Modified:
trunk/Graph/tests/data/compare/ezcGraphSvgDriverTest_testDrawCircularArcObtuse.svg
==============================================================================
Binary files - no diff available.
Propchange:
trunk/Graph/tests/data/compare/ezcGraphSvgDriverTest_testDrawPolygonThreePointsNotFilledReverse.svg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified:
trunk/Graph/tests/data/compare/ezcGraphSvgDriverTest_testSvgWithDifferentLocales.svg
==============================================================================
Binary files - no diff available.
Added:
trunk/Graph/tests/data/compare/ezcGraphToolsTest_test3dBarChartSvgLinking.svg
==============================================================================
Binary file - no diff available.
Propchange:
trunk/Graph/tests/data/compare/ezcGraphToolsTest_test3dBarChartSvgLinking.svg
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
trunk/Graph/tests/data/compare/ezcGraphToolsTest_test3dBarChartSvgLinking.svg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: trunk/Graph/tests/driver_svg_test.php
==============================================================================
--- trunk/Graph/tests/driver_svg_test.php [iso-8859-1] (original)
+++ trunk/Graph/tests/driver_svg_test.php [iso-8859-1] Wed Aug 8 08:55:13 2007
@@ -524,7 +524,7 @@
);
$this->assertEquals(
- 'ezcGraphCircularArc_1',
+ 'ezcGraphCircularArc_2',
$return,
'Expected xml id as return value.'
);
Modified: trunk/Graph/tests/image_map_test.php
==============================================================================
--- trunk/Graph/tests/image_map_test.php [iso-8859-1] (original)
+++ trunk/Graph/tests/image_map_test.php [iso-8859-1] Wed Aug 8 08:55:13 2007
@@ -207,6 +207,73 @@
$this->assertSame( 'http://example.com/',
$reference['legend_url']['sampleData'], 'Link expected for "sampleData".' );
}
+ public function testReturnFrom3dSvgBarChart()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.svg';
+
+ $chart = new ezcGraphBarChart();
+ $chart->palette = new ezcGraphPaletteBlack();
+ $chart->renderer = new ezcGraphRenderer3d();
+
+ $chart->data['sampleData'] = new ezcGraphArrayDataSet( array( 'sample
1' => 234, 'sample 2' => 21, 'sample 3' => 324, 'sample 4' => 120, 'sample 5'
=> 1) );
+ $chart->data['moreData'] = new ezcGraphArrayDataSet( array( 'sample 1'
=> 234, 'sample 2' => 21, 'sample 3' => 324, 'sample 4' => 120, 'sample 5' =>
1) );
+ $chart->data['evenMoreData'] = new ezcGraphArrayDataSet( array(
'sample 1' => 234, 'sample 2' => 21, 'sample 3' => 324, 'sample 4' => 120,
'sample 5' => 1) );
+
+ $chart->data['sampleData']->url = 'http://example.com/sampleData';
+ $chart->data['sampleData']->symbol = ezcGraph::DIAMOND;
+ $chart->data['moreData']->url = 'http://example.com/moreData';
+ $chart->data['moreData']->symbol = ezcGraph::CIRCLE;
+ $chart->data['evenMoreData']->url = 'http://example.com/evenMoreData';
+ $chart->data['evenMoreData']->symbol = ezcGraph::BULLET;
+
+ $chart->render( 500, 200, $filename );
+
+ $reference = $chart->renderer->getElementReferences();
+
+ // Check data references
+ $this->assertSame( 3, count( $reference['data'] ), '3 datasets
expected.' );
+ $this->assertSame( 5, count( $reference['data']['sampleData'] ),
'[sampleData] 5 datapoints expected.' );
+ $this->assertSame( 3, count( $reference['data']['sampleData']['sample
2'] ), '[sampleData] 3 elements for datapoint expected.' );
+ $this->assertSame( 'ezcGraphPolygon_98',
$reference['data']['sampleData']['sample 2'][0], '[sampleData] ezcGraph element
expected.' );
+ $this->assertSame( 'ezcGraphPolygon_99',
$reference['data']['sampleData']['sample 2'][1], '[sampleData] ezcGraph element
expected.' );
+ $this->assertSame( 'ezcGraphPolygon_100',
$reference['data']['sampleData']['sample 2'][2], '[sampleData] ezcGraph element
expected.' );
+
+ // Check data references
+ $this->assertSame( 5, count( $reference['data']['moreData'] ),
'[moreData] 5 datapoints expected.' );
+ $this->assertSame( 2, count( $reference['data']['moreData']['sample
2'] ), '[moreData] 3 elements for datapoint expected.' );
+ $this->assertSame( 'ezcGraphCircularArc_102',
$reference['data']['moreData']['sample 2'][0], '[moreData] ezcGraph element
expected.' );
+ $this->assertSame( 'ezcGraphCircle_103',
$reference['data']['moreData']['sample 2'][1], '[moreData] ezcGraph element
expected.' );
+
+ // Check data references
+ $this->assertSame( 5, count( $reference['data']['evenMoreData'] ),
'[evenMoreData] 5 datapoints expected.' );
+ $this->assertSame( 2, count(
$reference['data']['evenMoreData']['sample 2'] ), '[evenMoreData] 3 elements
for datapoint expected.' );
+ $this->assertSame( 'ezcGraphCircularArc_105',
$reference['data']['evenMoreData']['sample 2'][0], '[evenMoreData] ezcGraph
element expected.' );
+ $this->assertSame( 'ezcGraphCircle_106',
$reference['data']['evenMoreData']['sample 2'][1], '[evenMoreData] ezcGraph
element expected.' );
+
+ // Check legend references
+ $this->assertSame( 3, count( $reference['legend'] ), '3 legend items
expected.' );
+ $this->assertSame( 2, count( $reference['legend']['sampleData'] ), '2
elements for legend item expected.' );
+ $this->assertSame( 'ezcGraphPolygon_4',
$reference['legend']['sampleData']['symbol'], 'ezcGraphCircle expected as
legend symbol.' );
+ $this->assertSame( 'ezcGraphTextBox_5',
$reference['legend']['sampleData']['text'], 'ezcGraphTextBox expected for
legend text.' );
+
+ // Check legend references
+ $this->assertSame( 3, count( $reference['legend'] ), '3 legend items
expected.' );
+ $this->assertSame( 2, count( $reference['legend']['moreData'] ), '2
elements for legend item expected.' );
+ $this->assertSame( 'ezcGraphCircle_6',
$reference['legend']['moreData']['symbol'], 'ezcGraphCircle expected as legend
symbol.' );
+ $this->assertSame( 'ezcGraphTextBox_7',
$reference['legend']['moreData']['text'], 'ezcGraphTextBox expected for legend
text.' );
+
+ // Check legend references
+ $this->assertSame( 3, count( $reference['legend'] ), '3 legend items
expected.' );
+ $this->assertSame( 2, count( $reference['legend']['evenMoreData'] ),
'2 elements for legend item expected.' );
+ $this->assertSame( 'ezcGraphCircle_8',
$reference['legend']['evenMoreData']['symbol'], 'ezcGraphCircle expected as
legend symbol.' );
+ $this->assertSame( 'ezcGraphTextBox_9',
$reference['legend']['evenMoreData']['text'], 'ezcGraphTextBox expected for
legend text.' );
+
+ // Check for legend URLs
+ $this->assertSame( 3, count( $reference['legend_url'] ), '3 legend url
items expected.' );
+ $this->assertSame( 'http://example.com/moreData',
$reference['legend_url']['moreData'], 'Link expected for "moreData".' );
+ $this->assertSame( 'http://example.com/sampleData',
$reference['legend_url']['sampleData'], 'Link expected for "sampleData".' );
+ }
+
public function testReturnFrom3dSvgPieChart()
{
$filename = $this->tempDir . __FUNCTION__ . '.svg';
@@ -231,8 +298,8 @@
$this->assertSame( 1, count( $reference['data'] ), 'One dataset
expected.' );
$this->assertSame( 5, count( $reference['data']['sample'] ), '5
datapoints expected.' );
$this->assertSame( 2, count( $reference['data']['sample']['Mozilla']
), '2 elements for datapoint expexted' );
- $this->assertSame( 'ezcGraphCircleSector_40',
$reference['data']['sample']['Mozilla'][0], 'ezcGraphCircleSector expected.' );
- $this->assertSame( 'ezcGraphTextBox_61',
$reference['data']['sample']['Mozilla'][1], 'ezcGraphTextBox expected.' );
+ $this->assertSame( 'ezcGraphCircleSector_46',
$reference['data']['sample']['Mozilla'][0], 'ezcGraphCircleSector expected.' );
+ $this->assertSame( 'ezcGraphTextBox_67',
$reference['data']['sample']['Mozilla'][1], 'ezcGraphTextBox expected.' );
// Check legend references
$this->assertSame( 5, count( $reference['legend'] ), '5 legend items
expected.' );
@@ -308,9 +375,9 @@
$this->assertSame( 1, count( $reference['data'] ), 'One dataset
expected.' );
$this->assertSame( 5, count( $reference['data']['sample'] ), '5
datapoints expected.' );
$this->assertSame( 3, count( $reference['data']['sample']['Mozilla']
), '2 elements for datapoint expexted' );
- $this->assertSame( 'ezcGraphCircleSector_39',
$reference['data']['sample']['Mozilla'][0], 'ezcGraphCircleSector expected.' );
- $this->assertSame( 'ezcGraphCircleSector_40',
$reference['data']['sample']['Mozilla'][1], 'ezcGraphCircleSector expected.' );
- $this->assertSame( 'ezcGraphTextBox_71',
$reference['data']['sample']['Mozilla'][2], 'ezcGraphTextBox expected.' );
+ $this->assertSame( 'ezcGraphCircleSector_45',
$reference['data']['sample']['Mozilla'][0], 'ezcGraphCircleSector expected.' );
+ $this->assertSame( 'ezcGraphCircleSector_46',
$reference['data']['sample']['Mozilla'][1], 'ezcGraphCircleSector expected.' );
+ $this->assertSame( 'ezcGraphTextBox_77',
$reference['data']['sample']['Mozilla'][2], 'ezcGraphTextBox expected.' );
// Check legend references
$this->assertSame( 5, count( $reference['legend'] ), '5 legend items
expected.' );
Modified: trunk/Graph/tests/tools_test.php
==============================================================================
--- trunk/Graph/tests/tools_test.php [iso-8859-1] (original)
+++ trunk/Graph/tests/tools_test.php [iso-8859-1] Wed Aug 8 08:55:13 2007
@@ -356,6 +356,36 @@
);
}
+ public function test3dBarChartSvgLinking()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.svg';
+
+ $chart = new ezcGraphBarChart();
+ $chart->palette = new ezcGraphPaletteBlack();
+ $chart->options->fillLines = 200;
+ $chart->renderer = new ezcGraphRenderer3d();
+
+ $chart->data['sampleData'] = new ezcGraphArrayDataSet( array( 'sample
1' => 234, 'sample 2' => 21, 'sample 3' => 324, 'sample 4' => 120, 'sample 5'
=> 1) );
+ $chart->data['moreData'] = new ezcGraphArrayDataSet( array( 'sample 1'
=> 234, 'sample 2' => 21, 'sample 3' => 324, 'sample 4' => 120, 'sample 5' =>
1) );
+ $chart->data['evenMoreData'] = new ezcGraphArrayDataSet( array(
'sample 1' => 234, 'sample 2' => 21, 'sample 3' => 324, 'sample 4' => 120,
'sample 5' => 1) );
+
+ $chart->data['sampleData']->url = 'http://example.com/sampleData';
+ $chart->data['sampleData']->symbol = ezcGraph::DIAMOND;
+ $chart->data['moreData']->url = 'http://example.com/moreData';
+ $chart->data['moreData']->symbol = ezcGraph::CIRCLE;
+ $chart->data['evenMoreData']->url = 'http://example.com/evenMoreData';
+ $chart->data['evenMoreData']->symbol = ezcGraph::BULLET;
+
+ $chart->render( 500, 200, $filename );
+
+ ezcGraphTools::linkSvgElements( $chart );
+
+ $this->compare(
+ $filename,
+ $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ .
'.svg'
+ );
+ }
+
public function testSvgLinkingWithWrongDriver()
{
$filename = $this->tempDir . __FUNCTION__ . '.svg';
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components