pacbard / gChartPhp

Apache License 2.0
88 stars 45 forks source link

can't get examples to work #1

Closed kanliot closed 12 years ago

kanliot commented 12 years ago

examples don't work due to "class not found errors" in PHP 5.3. I fix those, and then my label are missing, then more problems from there.

ghost commented 12 years ago

In gChartExample.php change:

<?php ini_set('display_errors','1'); ?>

to

<?php namespace gchart; ini_set('display_errors','1'); ?>

then you also need to require the php files you are going to use. In the example you would probably chage

<?php require ('gChart.php'); ?>

to

<?php require('utility.php'); require('gChart.php'); require('gLineChart.php'); require('gPieChart.php'); require('gBarChart.php'); require('gConcentricPieChart.php'); require('gFormula.php'); require('gGroupedBarChart.php'); require('gMapChart.php'); require('gMeterChart.php'); require('gOverlappedBarChart.php'); require('gPie3DChart.php'); require('gQRCode.php'); require('gScatterChart.php'); require('gStackedBarChart.php'); require('gVennDiagram.php'); ?>

rampr commented 12 years ago

This might help - https://github.com/pacbard/gChartPhp/pull/3

ghost commented 12 years ago

nice job. I was thinking about this again the other day and almost did the same thing.

rampr commented 12 years ago

Thanks. Actually the directory structure can also be a lot more organized and cleaner, like splitting up the examples and the source into multiple directories.