Hello,

I am looking to procedurally generate charts to display logging data. I 
think I would like to use the "Annotated Time Line" chart, as it provides a 
built in scrolling bar to zoom in on relevant areas of the chart. But I am 
having a problem with the zoom, it seems to be going backwards! I'm not 
sure how to describe the problem, but you can easily see it if you copy and 
past the following code into a .txt. Another problem I have is that the 
dates along the X axis disappear, so there are no labels on the X axis. I 
think it might have something to do with the "new Date(...)" calls. Is it 
possible to create a date object with just a time, and no date? For 
instance all of the events happen on 2007/7/7, its the time I want to use 
to differentiate them, not the date itself. 

I tried debugging it in the visualization playground but it doesn't give me 
any errors. Here is the code, any help would be greatly appreciated! Thanks


<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title>LogMeIn Data Visualization</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 data = new google.visualization.DataTable();
      
          data.addColumn('date', 'timestamp');
          data.addColumn('number', 'BlocksSent count');
          data.addColumn('number', 'GatewayMessagesReceived count');
          data.addRows([
               [new Date(2007, 7, 7, 12,19,30,502), 0, 12],
               [new Date(2007, 7, 7, 12,19,34,519), 459, 4],
               [new Date(2007, 7, 7, 12,19,35,519), 11, 0],
               [new Date(2007, 7, 7, 12,19,36,519), 14, 0],
               [new Date(2007, 7, 7, 12,19,37,520), 126, 0],
               [new Date(2007, 7, 7, 12,20,39,622), 122, 0],
               [new Date(2007, 7, 7, 12,20,40,623), 188, 0],
               [new Date(2007, 7, 7, 12,20,41,623), 174, 0],
               [new Date(2007, 7, 7, 12,20,42,624), 186, 0],
               [new Date(2007, 7, 7, 12,20,43,625), 160, 1]          
]);      
    
var annotatedtimeline = new google.visualization.AnnotatedTimeLine(
          document.getElementById('visualization'));
      annotatedtimeline.draw(data, {'displayAnnotations': true});
      }
    
    google.setOnLoadCallback(drawVisualization);
  </script>
</head>
<body style="font-family: Arial;border: 0 none;">
<div id="visualization" style="width: 800px; height: 400px;"></div>
</body>
</html>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to