Guest User

Untitled

a guest
Jul 20th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. $( function() {
  2. if(!$(".google-chart").length)
  3. return
  4.  
  5. var chartPool = [];
  6.  
  7. chartPool.push(function() {
  8. var data = new google.visualization.DataTable();
  9. data.addColumn('date', 'Date');
  10. data.addColumn('number', 'Посетителей');
  11. data.addColumn('number', 'Игр');
  12. data.addRows([
  13. [new Date(2008, 1 ,1), 100, 2000],
  14. [new Date(2008, 6 ,2), 50, 3000],
  15. [new Date(2009, 1 ,2), 50, 3000],
  16. [new Date(2009, 6 ,2), 50, 3000],
  17. [new Date(2010, 1 ,2), 50, 3000],
  18. [new Date(2010, 6 ,2), 50, 3000],
  19. [new Date(2011, 1 ,2), 50, 3000],
  20. [new Date(2011, 6 ,2), 50, 3000],
  21. ]);
  22.  
  23. var chart = new google.visualization.AnnotatedTimeLine($('#application_stats').get(0));
  24. chart.draw(data, {displayAnnotations: true});
  25. });
  26.  
  27.  
  28.  
  29. $.each(chartPool, function(){
  30. this.call();
  31. });
  32.  
  33.  
  34. });
Add Comment
Please, Sign In to add comment