box3_left.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. var dom = document.getElementById("box3_left");
  2. var myChart = echarts.init(dom);
  3. var app = {};
  4. option = null;
  5. app.title = '极坐标系下的堆叠柱状图';
  6. option = {
  7. textStyle:{//图例文字的样式
  8. color:'#dbdbdb',
  9. fontSize:10
  10. },
  11. angleAxis: {
  12. },
  13. radiusAxis: {
  14. type: 'category',
  15. data: ['周一', '周二', '周三', '周四'],
  16. z: 10
  17. },
  18. polar: {
  19. },
  20. series: [{
  21. type: 'bar',
  22. data: [1, 2, 3, 4],
  23. coordinateSystem: 'polar',
  24. name: 'A',
  25. stack: 'a'
  26. }, {
  27. type: 'bar',
  28. data: [2, 4, 6, 8],
  29. coordinateSystem: 'polar',
  30. name: 'B',
  31. stack: 'a'
  32. }, {
  33. type: 'bar',
  34. data: [1, 2, 3, 4],
  35. coordinateSystem: 'polar',
  36. name: 'C',
  37. stack: 'a'
  38. }],
  39. legend: {
  40. show: true,
  41. textStyle:{//图例文字的样式
  42. color:'#dbdbdb',
  43. fontSize:10
  44. },
  45. data: ['A', 'B', 'C']
  46. }
  47. };
  48. ;
  49. if (option && typeof option === "object") {
  50. myChart.setOption(option, true);
  51. }