you might miss to declare any variables .
E.g var data
i also got same error ,finally i found that i missed to declare
data = google.visualization.arrayToDataTable(sourcedata); and i changed that as
var data = google.visualization.arrayToDataTable(sourcedata);