Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. $('#table').dataTable( {
  2. "processing": true,
  3. "serverSide": true,
  4. "ajax": "http://api.mywebsite.com/report",
  5. "columns": [
  6. { "data": "date" },
  7. { "data": "ordernumber" },
  8. { "data": "totalsales" },
  9. { "data": "subtotal" }
  10. ]
  11. } );
  12.  
  13. google.setOnLoadCallback(drawChart);
  14. function drawChart() {
  15. var data = google.visualization.arrayToDataTable([
  16. ['Date', 'Sales'],
  17. ['20 Jan - Feb 04', 10340 ],
  18. ['20 Feb - Mar 05', 23470 ],
  19. ['20 June - Dec 06', 450 ],
  20. ['20 Mar - Aug 07', 3030 ]
  21. ]);
  22.  
  23. var options = {
  24. title: 'Company Performance'
  25. };
  26.  
  27. var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
  28.  
  29. chart.draw(data, options);
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement