opt-trades.html 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <html>
  2. <head>
  3. <script type="text/javascript" src="https://www.google.com/jsapi"></script>
  4. <script type="text/javascript">
  5. google.load("visualization", "1.1", {packages:["bar"]});
  6. // google.load("visualization", "1.1", {packages:["corechart"]});
  7. google.setOnLoadCallback(drawChart);
  8. function drawChart() {
  9. var data = google.visualization.arrayToDataTable([
  10. ['Strike Price', 'P', 'C', ],
  11. [18000,-1.0,0],
  12. [18600,-1.0,0],
  13. [18800,-1.0,0],
  14. [19800,-1.0,0],
  15. [20200,-1.0,0],
  16. [20800,-2.2,0],
  17. [21000,-0.2,0],
  18. [21600,0.0,0],
  19. [21800,-4.0,0],
  20. [22600,0,-1.0],
  21. [22600,3.2,0],
  22. [23000,0,-1.0],
  23. [23200,1.0,0],
  24. [23600,0,-2.0],
  25. [23600,1.8,0],
  26. [23800,0,-1.0],
  27. [24000,0,-2.0],
  28. [24200,0,-1.0],
  29. [24400,0,1.0],
  30. [24800,0,-1.0],
  31. ]);
  32. var options = {
  33. width: 900,
  34. chart: {
  35. title: 'Option Postion Distribution',
  36. subtitle: 'for the month of August and Sept 2015',
  37. },
  38. };
  39. var chart = new google.charts.Bar(document.getElementById('barchart_material'));
  40. chart.draw(data, options);
  41. }
  42. </script>
  43. </head>
  44. <body>
  45. <div id="barchart_material" style="width: 900px; height: 500px;"></div>
  46. </body>
  47. </html>