I have tried for several hours to get MySQL data in a Google charts but I can't wrap my head around how to make a working page from the examples I've come across on the internet.
To start fresh I took a example from Google charts and manually filled it with data. This gives me the graph I want to have. the Google charts graph is generated by a simple HTML PAGE (JUST THE VARIABLE PART:
....
function drawChart() {
var data = google.visualization.arrayToDataTable([
['date', 'Baxico' , 'Degriek' , 'Foldman' , 'Madmeijs' , 'Marcello' , 'Meijster' , 'Pokermom'],
['110415180035', 38, 1, 16, 10, 6, 4, 25 ],
['110415190222', 38, 16, 6, 4, 1, 25, 10 ],
['110415200747', 6, 38, 25, 10, 1, 16, 4 ],
['110415211933', 10, 38, 6, 25, 4, 16, 1 ],
['110415222033', 16, 1, 10, 6, 38, 25, 4 ],
['110415232833', 38, 4, 1, 25, 10, 6, 16 ]
]);
I made the same data output in MySQL:
select tournamentid
,(select points from pokermax_scores as t2 where playerid = 'Baxico' and t1.tournamentid = t2.tournamentid) as Baxico
,(select points from pokermax_scores as t2 where playerid = 'Degriek' and t1.tournamentid = t2.tournamentid) as Degriek
,(select points from pokermax_scores as t2 where playerid = 'Foldman' and t1.tournamentid = t2.tournamentid) as Foldman
,(select points from pokermax_scores as t2 where playerid = 'Madmeijs' and t1.tournamentid = t2.tournamentid) as Madmeijs
,(select points from pokermax_scores as t2 where playerid = 'Marcello' and t1.tournamentid = t2.tournamentid) as Marcello
,(select points from pokermax_scores as t2 where playerid = 'Meijster' and t1.tournamentid = t2.tournamentid) as Meijster
,(select points from pokermax_scores as t2 where playerid = 'Pokermom' and t1.tournamentid = t2.tournamentid) as Pokermom
from pokermax_scores as t1
group by tournamentid
which results in same data: http://i60.tinypic.com/6nqp76.png
But I can't get the data loaded as shown in this example: http://datamakessense.com/google-charts-api-from-your-sql-database-to-a-live-chart-with-no-coding-skills/
I can make the database connection, and paste in the SQL, but I'm unclear how to set the script so it takes the data from the SQL.