Ok, I'm baffled. Isn't:
$n = 0;
foreach($gens as $gen)
{
$plot = new BarPlot($uze[$gen]);
$plot->SetFillColor=$colors[$n];
$abp[]= $plot;
$n++;
}
$abp1plot = new AccBarPlot ($abp);
$graph->Add($abp1plot);
equivalent to:
// Create the bar plots
$b1plot = new BarPlot($data1y);
$b1plot->SetFillColor("orange");
$b2plot = new BarPlot($data2y);
$b2plot->SetFillColor("blue");
// Create the grouped bar plot
$gbplot = new AccBarPlot(array($b1plot,$b2plot));
// ...and add it to the graPH
$graph->Add($gbplot);
?
If so, why does my graph only display 1 series? I have verified the content of each array (yes, matching quantity of data points and datapoint values >0), and of the $abp array as containing a plot (print_r shows the content of the plot, including valid data point values). I get one set of bars instead of 12. $colors[] has a list of hex color values, and $gen[] has a list of the names of the series. What am I missing?
Oh yeah, I'm doing it this way because the number of series can (and does) change so I can't hard-code the arrays.
I've tested a simpler version of this with a couple of small arrays and it worked so I know the installation is good. There is something about this particular code that is causing an issue but I can't seem to connect the dots.
Thanks,
Duane