index.htm 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>Highcharts Example</title>
  7. <style type="text/css">
  8. </style>
  9. </head>
  10. <body>
  11. <script src="../../code/highcharts.js"></script>
  12. <script src="../../code/highcharts-more.js"></script>
  13. <script src="../../code/modules/exporting.js"></script>
  14. <script src="../../code/modules/export-data.js"></script>
  15. <div id="container" style="height: 400px; margin: auto; min-width: 310px; max-width: 600px"></div>
  16. <script type="text/javascript">
  17. Highcharts.chart('container', {
  18. chart: {
  19. type: 'boxplot'
  20. },
  21. title: {
  22. text: 'Highcharts Box Plot Example'
  23. },
  24. legend: {
  25. enabled: false
  26. },
  27. xAxis: {
  28. categories: ['1', '2', '3', '4', '5'],
  29. title: {
  30. text: 'Experiment No.'
  31. }
  32. },
  33. yAxis: {
  34. title: {
  35. text: 'Observations'
  36. },
  37. plotLines: [{
  38. value: 932,
  39. color: 'red',
  40. width: 1,
  41. label: {
  42. text: 'Theoretical mean: 932',
  43. align: 'center',
  44. style: {
  45. color: 'gray'
  46. }
  47. }
  48. }]
  49. },
  50. series: [{
  51. name: 'Observations',
  52. data: [
  53. [760, 801, 848, 895, 965],
  54. [733, 853, 939, 980, 1080],
  55. [714, 762, 817, 870, 918],
  56. [724, 802, 806, 871, 950],
  57. [834, 836, 864, 882, 910]
  58. ],
  59. tooltip: {
  60. headerFormat: '<em>Experiment No {point.key}</em><br/>'
  61. }
  62. }, {
  63. name: 'Outlier',
  64. color: Highcharts.getOptions().colors[0],
  65. type: 'scatter',
  66. data: [ // x, y positions where 0 is the first category
  67. [0, 644],
  68. [4, 718],
  69. [4, 951],
  70. [4, 969]
  71. ],
  72. marker: {
  73. fillColor: 'white',
  74. lineWidth: 1,
  75. lineColor: Highcharts.getOptions().colors[0]
  76. },
  77. tooltip: {
  78. pointFormat: 'Observation: {point.y}'
  79. }
  80. }]
  81. });
  82. </script>
  83. </body>
  84. </html>