Hi all,

Im trying to create a annotated timeline with python api (ToJSon) and cant 
make things work :(
Any hint on what im doing wrong with json_data[1] ?

thanks in advance,
--Brenno

Ref.:
[1]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title>Simple test</title>
  <script type="text/javascript" src="http://www.google.com/jsapi";></script>
  <script type="text/javascript">
    google.load('visualization', '1', {packages: ['annotatedtimeline']});
    function drawVisualization() {
      var json_data = new google.visualization.DataTable(
        {
          "rows":[
            {"c":[{"v":"Date(2012,6,11,19,15,0)"},null,null,{"v":14}]},
            {"c":[{"v":"Date(2012,6,11,19,20,0)"},null,null,{"v":12}]},
            {"c":[{"v":"Date(2012,6,11,19,25,0)"},{"v":"event description"},
{"v":"event title"},{"v":12}]},
            {"c":[{"v":"Date(2012,6,11,19,30,0)"},null,null,{"v":11}]},
            {"c":[{"v":"Date(2012,6,11,19,35,0)"},null,null,{"v":12}]}
          ],
          "cols":[
            {"type":"datetime","id":"time","label":"Hora"},
            {"type":"string","id":"text","label":"Text"},
            {"type":"string","id":"title","label":"Title"},
            {"type":"number","id":"value","label":"CpuUsage"}
          ]
        }, 0.6);
      
      var annotatedtimeline = new google.visualization.AnnotatedTimeLine(
document.getElementById('visualization'));
      annotatedtimeline.draw(json_data, {'displayAnnotations': true});
    }
    google.setOnLoadCallback(drawVisualization);
  </script>
</head>
<body style="font-family: Arial;border: 0 none;">
<div id="visualization" style="width: 720px; height: 240px;"></div>
</body>
</html>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/2Gc-wU2vZloJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to