What does your PHP output? Open the page in a browser, view the source, and paste it here.
On Thursday, October 17, 2013 12:47:44 PM UTC-4, Denis wrote: > > Hi, > I am trying to find a way to draw a Google chart from a html application. > I am reading a file, with datas on each line. > I would like to have the first data as a xaxis value but I can't. > > For the other values, I use the <?php echo "$val" ?> system, but it doesnt > work for column zero ... > > My example (justfor test. In fact $d1 and $d2 are coming from an array) > > <html> > <?php > $d1="05/2010"; > $d2="06/2010"; > ?> > <head> > <script type='text/javascript' src='https://www.google.com/jsapi > '></script> > <script type='text/javascript'> > google.load('visualization', '1', {packages:['table']}); > google.setOnLoadCallback(drawTable); > function drawTable() { > var data = new google.visualization.DataTable(); > data.addColumn('string', 'Name'); > data.addColumn('number', 'Salary'); > data.addColumn('boolean', 'Full Time Employee'); > data.addRows([ > [<?php echo '$d1' ?>, {v: 10000, f: '$10,000'}, true], > [<?php echo '$d22'?>, {v:8000, f: '$8,000'}, false], > ]); > var table = new > google.visualization.Table(document.getElementById('table_div')); > table.draw(data, {showRowNumber: false}); > } > </script> > </head> > <body> > <div id='table_div'></div> > </body> > </html> > > If someone can help ... > -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/groups/opt_out.
