I'm trying to create a PHP script that graphs some historical stock data.
I have the data in an array and am trying to graph it with gchartphp using this code:
require_once("../gchart/gChart.php");
$lineChart = new gLineChart(1000, 200);
//********PROBLEM HERE**********
$lineChart->addDataSet($yearsData);
//******************************
$lineChart->setLegend(array('Nice figures'));
$lineChart->setColors(array('ED237A'));
$lineChart->setVisibleAxes(array('x','y'));
$lineChart->setDataRange(0,1);
$lineChart->setLegendPosition('r');
// axisnr, from, to, step
$lineChart->addAxisRange(0,0,365);
$lineChart->addAxisRange(1,0,1);
$lineChart->setGridLines(floatval(1.9),10);
$lineChart->renderImage(true);
If I put something like this in addDataSet it works and the graph displays.
array(0.34234, 1, 10, .01, 20)
However, if I put an array with 365 values in addDataSet the graph does not render and the page shows a broken image symbol. The page shows no warnings or errors.
Any suggestions? Is there a limit to how many values you can graph?