Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#table').dataTable( {
- "processing": true,
- "serverSide": true,
- "ajax": "http://api.mywebsite.com/report",
- "columns": [
- { "data": "date" },
- { "data": "ordernumber" },
- { "data": "totalsales" },
- { "data": "subtotal" }
- ]
- } );
- google.setOnLoadCallback(drawChart);
- function drawChart() {
- var data = google.visualization.arrayToDataTable([
- ['Date', 'Sales'],
- ['20 Jan - Feb 04', 10340 ],
- ['20 Feb - Mar 05', 23470 ],
- ['20 June - Dec 06', 450 ],
- ['20 Mar - Aug 07', 3030 ]
- ]);
- var options = {
- title: 'Company Performance'
- };
- var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
- chart.draw(data, options);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement