Hi, If the result of the php is the same code below, and that code works statically, that sounds to me like a problem in the php or in the server rendering it.
Regards, VizBoy. On Wed, Mar 4, 2009 at 5:45 PM, rcrisman <[email protected]> wrote: > > All the data for the chart is pulled from MySQL using PHP. The code > below works fine when in a Static HTML page but on a PHP rendered page > it does not just gives a blank image and the Code is rendered exactly > the same as below. > > <html> > <head> > <script type="text/javascript" src=" > http://www.google.com/jsapi"></ > script> > <script type="text/javascript"> > google.load("visualization", "1", {packages:["linechart"]}); > google.setOnLoadCallback(drawChart); > function drawChart() { > var data = new google.visualization.DataTable(); > > data.addColumn('string', 'Year'); > data.addColumn('number', 'Mail'); > data.addColumn('number', 'Online'); > > data.addRows(5); > > data.setValue(0, 0, new Date(2005)); > data.setValue(0, 1,762); > data.setValue(1, 0, new Date(2006)); > data.setValue(1, 1,1464); > data.setValue(2, 0, new Date(2007)); > data.setValue(2, 1,1042); > data.setValue(3, 0, new Date(2008)); > data.setValue(3, 1,711); > data.setValue(4, 0, new Date(2009)); > data.setValue(4, 1,133); > > data.setValue(0, 0, new Date(2005)); > data.setValue(0, 2,0); > data.setValue(1, 0, new Date(2006)); > data.setValue(1, 2,34); > data.setValue(2, 0, new Date(2007)); > data.setValue(2, 2,391); > data.setValue(3, 0, new Date(2008)); > data.setValue(3, 2,516); > data.setValue(4, 0, new Date(2009)); > data.setValue(4, 2,125); > > var chart = new google.visualization.LineChart > (document.getElementById('chart_div')); > chart.draw(data, {width: 470, height: 240, legend: > 'bottom', title: > 'Repairs Filled'}); > } > </script> > </head> > <body> > <div id="chart_div"></div> > </body> > </html> > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en -~----------~----~----~----~------~----~------~--~---
