市长热线演示版

index.htm 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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://cdn.hcharts.cn/jquery/jquery-1.8.3.min.js"></script>
  7. <script type="text/javascript">
  8. $(function () {
  9. // Set up the chart
  10. var chart = new Highcharts.Chart({
  11. chart: {
  12. renderTo: 'container',
  13. type: 'column',
  14. margin: 75,
  15. options3d: {
  16. enabled: true,
  17. alpha: 15,
  18. beta: 15,
  19. depth: 50,
  20. viewDistance: 25
  21. }
  22. },
  23. title: {
  24. text: 'Chart rotation demo'
  25. },
  26. subtitle: {
  27. text: 'Test options by dragging the sliders below'
  28. },
  29. plotOptions: {
  30. column: {
  31. depth: 25
  32. }
  33. },
  34. series: [{
  35. data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
  36. }]
  37. });
  38. // Activate the sliders
  39. $('#R0').on('change', function(){
  40. chart.options.chart.options3d.alpha = this.value;
  41. showValues();
  42. chart.redraw(false);
  43. });
  44. $('#R1').on('change', function(){
  45. chart.options.chart.options3d.beta = this.value;
  46. showValues();
  47. chart.redraw(false);
  48. });
  49. function showValues() {
  50. $('#R0-value').html(chart.options.chart.options3d.alpha);
  51. $('#R1-value').html(chart.options.chart.options3d.beta);
  52. }
  53. showValues();
  54. });
  55. </script>
  56. </head>
  57. <body>
  58. <script src="../../js/highcharts.js"></script>
  59. <script src="../../js/highcharts-3d.js"></script>
  60. <script src="../../js/modules/exporting.js"></script>
  61. <div id="container"></div>
  62. <div id="sliders">
  63. <table>
  64. <tr><td>Alpha Angle</td><td><input id="R0" type="range" min="0" max="45" value="15"/> <span id="R0-value" class="value"></span></td></tr>
  65. <tr><td>Beta Angle</td><td><input id="R1" type="range" min="0" max="45" value="15"/> <span id="R1-value" class="value"></span></td></tr>
  66. </table>
  67. </div>
  68. </body>
  69. </html>