bar-polar-null-data-radial.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. type: 'category',
  32. data: ['周一', '周二', '周三', '周四']
  33. },
  34. radiusAxis: {
  35. },
  36. polar: {
  37. },
  38. series: [{
  39. type: 'bar',
  40. data: [1, '-', 3, '-'],
  41. coordinateSystem: 'polar'
  42. }, {
  43. type: 'bar',
  44. data: ['-', 4, '-', '-'],
  45. coordinateSystem: 'polar'
  46. }, {
  47. type: 'bar',
  48. data: ['-', '-', 3, 4],
  49. coordinateSystem: 'polar'
  50. }]
  51. });
  52. chart.on('click', function (params) {
  53. console.log(params);
  54. });
  55. window.onresize = chart.resize;
  56. });
  57. </script>
  58. </body>
  59. </html>