index.htm 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. @import 'https://code.highcharts.com/css/highcharts.css';
  9. #container {
  10. height: 400px;
  11. max-width: 800px;
  12. min-width: 320px;
  13. margin: 0 auto;
  14. }
  15. .highcharts-pie-series .highcharts-point {
  16. stroke: #EDE;
  17. stroke-width: 2px;
  18. }
  19. .highcharts-pie-series .highcharts-data-label-connector {
  20. stroke: silver;
  21. stroke-dasharray: 2, 2;
  22. stroke-width: 2px;
  23. }
  24. </style>
  25. </head>
  26. <body>
  27. <script src="../../code/highcharts.js"></script>
  28. <script src="../../code/modules/exporting.js"></script>
  29. <div id="container"></div>
  30. <script type="text/javascript">
  31. Highcharts.chart('container', {
  32. chart: {
  33. styledMode: true
  34. },
  35. title: {
  36. text: 'Pie point CSS'
  37. },
  38. xAxis: {
  39. categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
  40. },
  41. series: [{
  42. type: 'pie',
  43. allowPointSelect: true,
  44. keys: ['name', 'y', 'selected', 'sliced'],
  45. data: [
  46. ['Apples', 29.9, false],
  47. ['Pears', 71.5, false],
  48. ['Oranges', 106.4, false],
  49. ['Plums', 129.2, false],
  50. ['Bananas', 144.0, false],
  51. ['Peaches', 176.0, false],
  52. ['Prunes', 135.6, true, true],
  53. ['Avocados', 148.5, false]
  54. ],
  55. showInLegend: true
  56. }]
  57. });
  58. </script>
  59. </body>
  60. </html>