My guess is because Date months are zero-based.  So January is 0 ... March
is 2, not 3, etc.

On Jun 24, 2010 2:00 AM, "Gabriel Sosa" <[email protected]> wrote:

Hello,

I've been using AnnotatedTimeLine for few days and now I realized that
the date period is being showed a month ahead, like if I show data
from March to May... the result is shown from April to June. Here [1]
is an screenshot of what I'm talking about.

[1] http://img.skitch.com/20100623-djf78c8pth53m4d7wtptn9kekm.jpg

and here is my setup
==========================================
         <script type="text/javascript" src="https://www.google.com/jsapi
"></
script>
         <script type="text/javascript">
           google.load('visualization', '1', {packages:
['annotatedtimeline']});
           function drawVisualization() {
             var data = new google.visualization.DataTable();

             data.addRows(517);
             data.addColumn('date', 'Date');
             data.addColumn('number', 'percent: ');

                               /* 0 */ data.setValue(0, 0, new Date(2010, 3,
29, 3, 40));
data.setValue(0, 1, 80);
                               /* 1 */ data.setValue(1, 0, new Date(2010, 3,
29, 3, 15));
data.setValue(1, 1, 80);
                               /* 2 */ data.setValue(2, 0, new Date(2010, 3,
29, 3, 15));
data.setValue(2, 1, 80);
                               /* 3 */ data.setValue(3, 0, new Date(2010, 3,
30, 3, 15));
data.setValue(3, 1, 80);
                               /* 4 */ data.setValue(4, 0, new Date(2010, 3,
30, 3, 15));
data.setValue(4, 1, 80);
                              ...........cut..................
                               /* 514 */ data.setValue(514, 0, new
Date(2010, 6, 23, 6, 15));
data.setValue(514, 1, 95);
                               /* 515 */ data.setValue(515, 0, new
Date(2010, 6, 23, 6, 15));
data.setValue(515, 1, 95);
                               /* 516 */ data.setValue(516, 0, new
Date(2010, 6, 23, 6, 15));
data.setValue(516, 1, 60);


             var annotatedtimeline = new
google.visualization.AnnotatedTimeLine(
                 document.getElementById('visualization'));
             annotatedtimeline.draw(data, {'displayAnnotations': true});
           }

           google.setOnLoadCallback(drawVisualization);
         </script>
==========================================
any idea ?

--
You received this message because you are subscribed to the Google Groups
"Google Chart API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected]<google-chart-api%[email protected]>
.
For more options, visit this group at
http://groups.google.com/group/google-chart-api?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Chart API" group.
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-chart-api?hl=en.

Reply via email to