I am trying to draw Motion Chart using Fusion table API. The error message I am receiving is:
"Could not parse query."
I had my fusion table format to be text on first column, date on second column, as required by the visualization type. This is my code, underneath. Please, what am I doing wrong.
google.load("visualization", "1", {packages:["motionchart"]}); google.setOnLoadCallback(drawVisualization); function drawVisualization() { google.visualization.drawChart({ "containerId": "scatter", "dataSourceUrl": "//www.google.com/fusiontables/gvizdata?tq=", "query": "SELECT 'Nationality','Date','StatusofStudentship','Gender','ModeofAdmission','CourseofStudy','ProgrammeofStudy','CGPA','Race','EnglishLanguageProficiency','Disability','ModeofStudy','InternshipLength','SoftskillQuality','HealthSoundness','Employability','DefermentLength','Religion','Mode of Sponsorship',FROM " + "19mRBx3ysm3VfJQ746j8obWldgjxpw1-sBNdQy4kQ#rows:id=1", "refreshInterval": 20, "chartType": "MotionChart", "options": {} }); options['state'] = chart.draw(data, {width: 900, height:400}); '{"colorOption":"4","iconKeySettings":[],"nonSelectedAlpha":0.4,"orderedByX":false,"iconType":"BUBBLE","yAxisOption":"3","uniColorForNonSelected":false,"yZoomedDataMin":150,"dimensions":{"iconDimensions":["dim0"]},"orderedByY":false,"xZoomedIn":false,"yZoomedDataMax":617,"duration":{"multiplier":1,"timeUnit":"D"},"showTrails":true,"xAxisOption":"2","xZoomedDataMax":1200,"time":"1988","xZoomedDataMin":300,"playDuration":15000,"yLambda":1,"sizeOption":"_UNISIZE","yZoomedIn":false,"xLambda":1};'; options['width'] = 900; options['height'] = 400; } google.setOnLoadCallback(drawVisualization);
That error means your query is invalid. The 'ModeofSponsorship' column does not have spaces in its name:
should be:
This also looks wrong:
probably need to remove the
#rows:id=1
from the end.