Advertisement
Guest User

Untitled

a guest
Apr 28th, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <script src="assets/js/jquery-2.2.3.min.js"></script>
  5. <script src="assets/js/canvasjs.min.js"></script>
  6. <script type="text/javascript">
  7.  
  8. window.onload = function () {
  9. var users = '<?php echo json_encode($users); ?>';
  10. // users = $.parseJSON(users);
  11. users = JSON.parse(users);
  12. console.log(users);
  13. var chart = new CanvasJS.Chart("chartContainer", {
  14. title:{
  15. text: "Who's killing the Long Distance Bill? Top 20"
  16. },
  17. axisX: {
  18. title: "WT Users",
  19. },
  20. axisY: {
  21. title: "Dollars"
  22. },
  23. data: [
  24. {
  25. // Change type to "doughnut", "line", "splineArea", etc.
  26. type: "column",
  27. //dataPoints:[]
  28. dataPoints : [
  29. { label: "104751", y: "63.6404"},
  30. { label: "133263", y: "57.0851"}
  31. ]
  32.  
  33. }
  34. ]
  35. });
  36. // chart.options.data=users;
  37. chart.render();
  38. }
  39. </script>
  40. </head>
  41.  
  42. <body>
  43. <div id="chartContainer" style="height: 300px; width: 100%;">
  44. </div>
  45. </body>
  46. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement