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.

77 lines
2.1 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. $(document).ready(function () {
  13. // Build the chart
  14. $('#container').highcharts({
  15. chart: {
  16. plotBackgroundColor: null,
  17. plotBorderWidth: null,
  18. plotShadow: false,
  19. type: 'pie'
  20. },
  21. title: {
  22. text: 'Browser market shares January, 2015 to May, 2015'
  23. },
  24. tooltip: {
  25. pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
  26. },
  27. plotOptions: {
  28. pie: {
  29. allowPointSelect: true,
  30. cursor: 'pointer',
  31. dataLabels: {
  32. enabled: false
  33. },
  34. showInLegend: true
  35. }
  36. },
  37. series: [{
  38. name: "Brands",
  39. colorByPoint: true,
  40. data: [{
  41. name: "Microsoft Internet Explorer",
  42. y: 56.33
  43. }, {
  44. name: "Chrome",
  45. y: 24.03,
  46. sliced: true,
  47. selected: true
  48. }, {
  49. name: "Firefox",
  50. y: 10.38
  51. }, {
  52. name: "Safari",
  53. y: 4.77
  54. }, {
  55. name: "Opera",
  56. y: 0.91
  57. }, {
  58. name: "Proprietary or Undetectable",
  59. y: 0.2
  60. }]
  61. }]
  62. });
  63. });
  64. });
  65. </script>
  66. </head>
  67. <body>
  68. <script src="../../js/highcharts.js"></script>
  69. <script src="../../js/modules/exporting.js"></script>
  70. <div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
  71. </body>
  72. </html>