Javascript dates use 0-based indexing for months, so the first month of the 
year is 0, not 1.  This usually requires subtracting 1 from the month in 
most calendar systems.  As an example, "2014/01/23" is new Date(2014, 0, 23)

On Sunday, February 9, 2014 6:18:41 PM UTC-5, Sergey Sh wrote:
>
> Help to understand that my code not so? By date transfer in graphics I 
> receive 1 month more! It was necessary to reduce initially date for 1 month 
> - that isn't so correct!
> Code:
>
>
> <https://lh5.googleusercontent.com/-YDqyhfSma4w/UvgMuVs3PNI/AAAAAAAAAII/UqjbSMOjNno/s1600/1.jpg>
> <script type="text/javascript" src="https://www.google.com/jsapi";>
> </script> <script type="text/javascript"> google.load("visualization", 
> "1", {packages:["corechart"]}); google.setOnLoadCallback(drawChart);function 
> drawChart() {var data = new 
> google.visualization.DataTable();data.addColumn('date', 
> 'Дата');data.addColumn('number', 'Застройщик');data.addRows([[new Date(2013, 
> 10, 01),9004800],[new Date(2013, 11, 
> 08),9206400],[new Date(2014, 0, 08),9206400],[new Date(2014, 0, 
> 10),9206400],[new Date(2014, 0, 11),9206400],[new Date(2014, 0, 
> 14),9206400],[new Date(2014, 0, 17),9206400],[new Date(2014, 0, 
> 21),9206400],[new Date(2014, 0, 24),9206400],[new Date(2014, 0, 
> 28),9206400],[new Date(2014, 1, 04),9340800]]); var dataView = new 
> google.visualization.DataView(data); var options = { title: '', 
> pointSize: 5 }; var chart = new 
> google.visualization.LineChart(document.getElementById('chart_div'));chart.draw(dataView,
>  options);} 
> </script> <div id="chart_div" style="width: 900px; height: 350px;"></div>
>
>
>
>

-- 
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