index.htm 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. #container {
  9. max-width: 800px;
  10. height: 400px;
  11. margin: 1em auto;
  12. }
  13. </style>
  14. </head>
  15. <body>
  16. <script src="../../code/highcharts.js"></script>
  17. <script src="../../code/modules/pareto.js"></script>
  18. <div id="container"></div>
  19. <script type="text/javascript">
  20. Highcharts.chart('container', {
  21. chart: {
  22. renderTo: 'container',
  23. type: 'column'
  24. },
  25. title: {
  26. text: 'Restaurants Complaints'
  27. },
  28. tooltip: {
  29. shared: true
  30. },
  31. xAxis: {
  32. categories: [
  33. 'Overpriced',
  34. 'Small portions',
  35. 'Wait time',
  36. 'Food is tasteless',
  37. 'No atmosphere',
  38. 'Not clean',
  39. 'Too noisy',
  40. 'Unfriendly staff'
  41. ],
  42. crosshair: true
  43. },
  44. yAxis: [{
  45. title: {
  46. text: ''
  47. }
  48. }, {
  49. title: {
  50. text: ''
  51. },
  52. minPadding: 0,
  53. maxPadding: 0,
  54. max: 100,
  55. min: 0,
  56. opposite: true,
  57. labels: {
  58. format: "{value}%"
  59. }
  60. }],
  61. series: [{
  62. type: 'pareto',
  63. name: 'Pareto',
  64. yAxis: 1,
  65. zIndex: 10,
  66. baseSeries: 1
  67. }, {
  68. name: 'Complaints',
  69. type: 'column',
  70. zIndex: 2,
  71. data: [755, 222, 151, 86, 72, 51, 36, 10]
  72. }]
  73. });
  74. </script>
  75. </body>
  76. </html>