           }
            },
            legend: { position: 'bottom' }
          };

          chart.draw(data, options);

          allCharts.push(chart.getImageURI());
          chartsDrawn++;
          if(chartsDrawn == numCharts) {
            generateReport();
          }
    }

    function generateReport()
    {
      var c=document.getElementById("report");
      var ctx=c.getContext("2d");
      ctx.canvas.height = allCharts.length * 200;
      for(var i = 0; i < allCharts.length; i++) {
        va