Google AnnotatedTimeLine DateTime JSON Error
So I finally figured it out with a little help from the Google Visualisation API user group.
This both validates as JSON and renders correctly when using "v": "Date(2010, 01, 01)"
- note the lack of the "new"
keyword.
Hopefully this helps someone else in the future.
well tis RAW and MESSY, but it works!!
tested on jquery 1.4.2
google.load('visualization', '1', {packages: ['annotatedtimeline']});google.load('jquery','1.4');window.row = Array();$.getJSON( "https://spreadsheets.google.com/feeds/list/YOURDOCSKEYID/od6/public/values?alt=json-in-script&callback=?", function (data) { $.each(data.feed.entry, function(i,entry) { row.push([new Date(entry.gsx$date.$t),+entry.gsx$column1.$t,+entry.gsx$column2.$t]); });});function drawVisualization() { var data = new google.visualization.DataTable(); data.addColumn('date', 'Date'); data.addColumn('number', 'Column 1'); data.addColumn('number', 'Column 2'); data.addRows(row); var annotatedtimeline = new google.visualization.AnnotatedTimeLine( document.getElementById('visualization')); annotatedtimeline.draw(data, {'displayAnnotations': true});}google.setOnLoadCallback(drawVisualization);