You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.3 KiB

8 years ago
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <title>Highcharts Example</title>
  6. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
  7. <style type="text/css">
  8. ${demo.css}
  9. </style>
  10. <script type="text/javascript">
  11. $(function () {
  12. $('#container').highcharts({
  13. xAxis: {
  14. min: -0.5,
  15. max: 5.5
  16. },
  17. yAxis: {
  18. min: 0
  19. },
  20. title: {
  21. text: 'Scatter plot with regression line'
  22. },
  23. series: [{
  24. type: 'line',
  25. name: 'Regression Line',
  26. data: [[0, 1.11], [5, 4.51]],
  27. marker: {
  28. enabled: false
  29. },
  30. states: {
  31. hover: {
  32. lineWidth: 0
  33. }
  34. },
  35. enableMouseTracking: false
  36. }, {
  37. type: 'scatter',
  38. name: 'Observations',
  39. data: [1, 1.5, 2.8, 3.5, 3.9, 4.2],
  40. marker: {
  41. radius: 4
  42. }
  43. }]
  44. });
  45. });
  46. </script>
  47. </head>
  48. <body>
  49. <script src="../../js/highcharts.js"></script>
  50. <script src="../../js/modules/exporting.js"></script>
  51. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  52. </body>
  53. </html>