bar-polar-basic.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <html>
  2. <head>
  3. <meta charset="utf-8">
  4. <script src="lib/esl.js"></script>
  5. <script src="lib/config.js"></script>
  6. <meta name="viewport" content="width=device-width, initial-scale=1" />
  7. </head>
  8. <body>
  9. <style>
  10. html, body, #main {
  11. width: 100%;
  12. height: 100%;
  13. margin: 0;
  14. }
  15. #main {
  16. background: #fff;
  17. }
  18. </style>
  19. <div id="main"></div>
  20. <script>
  21. require([
  22. 'echarts'
  23. // 'echarts/chart/bar',
  24. // 'echarts/component/polar',
  25. // 'zrender/vml/vml'
  26. ], function (echarts) {
  27. var chart = echarts.init(document.getElementById('main'));
  28. chart.setOption({
  29. angleAxis: {
  30. },
  31. radiusAxis: {
  32. type: 'category',
  33. data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
  34. z: 10
  35. },
  36. polar: {
  37. },
  38. series: [{
  39. type: 'bar',
  40. data: [1, 2, 4, 3, 6, 5, 7],
  41. coordinateSystem: 'polar',
  42. itemStyle: {
  43. normal: {
  44. color: '#00f'
  45. }
  46. },
  47. barWidth: '50%'
  48. }]
  49. });
  50. chart.on('click', function (params) {
  51. console.log(params);
  52. });
  53. window.onresize = chart.resize;
  54. });
  55. </script>
  56. </body>
  57. </html>