bar-polar-null-data.html 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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/chart/line',
  25. // 'echarts/component/polar',
  26. // 'zrender/vml/vml'
  27. ], function (echarts) {
  28. var chart = echarts.init(document.getElementById('main'));
  29. chart.setOption({
  30. angleAxis: {
  31. },
  32. radiusAxis: {
  33. type: 'category',
  34. data: ['周一', '周二', '周三', '周四'],
  35. z: 10
  36. },
  37. polar: {
  38. },
  39. series: [{
  40. type: 'bar',
  41. data: [1, '-', 3, '-'],
  42. coordinateSystem: 'polar'
  43. }, {
  44. type: 'bar',
  45. data: ['-', 4, '-', '-'],
  46. coordinateSystem: 'polar'
  47. }, {
  48. type: 'bar',
  49. data: ['-', '-', 3, 4],
  50. coordinateSystem: 'polar'
  51. }]
  52. });
  53. chart.on('click', function (params) {
  54. console.log(params);
  55. });
  56. window.onresize = chart.resize;
  57. });
  58. </script>
  59. </body>
  60. </html>