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.

64 lines
1.8 KiB

9 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. chart: {
  14. type: 'funnel',
  15. marginRight: 100
  16. },
  17. title: {
  18. text: 'Sales funnel',
  19. x: -50
  20. },
  21. plotOptions: {
  22. series: {
  23. dataLabels: {
  24. enabled: true,
  25. format: '<b>{point.name}</b> ({point.y:,.0f})',
  26. color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black',
  27. softConnector: true
  28. },
  29. neckWidth: '30%',
  30. neckHeight: '25%'
  31. //-- Other available options
  32. // height: pixels or percent
  33. // width: pixels or percent
  34. }
  35. },
  36. legend: {
  37. enabled: false
  38. },
  39. series: [{
  40. name: 'Unique users',
  41. data: [
  42. ['Website visits', 15654],
  43. ['Downloads', 4064],
  44. ['Requested price list', 1987],
  45. ['Invoice sent', 976],
  46. ['Finalized', 846]
  47. ]
  48. }]
  49. });
  50. });
  51. </script>
  52. </head>
  53. <body>
  54. <script src="../../js/highcharts.js"></script>
  55. <script src="../../js/modules/funnel.js"></script>
  56. <script src="../../js/modules/exporting.js"></script>
  57. <div id="container" style="min-width: 410px; max-width: 600px; height: 400px; margin: 0 auto"></div>
  58. </body>
  59. </html>