You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

section_2_level.js 2.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. //各班等级分析
  2. function initclassLevelEcharts(){
  3. var xAxis_data = [
  4. "全年级",
  5. "八年级一班",
  6. "八年级二班",
  7. "八年级三班",
  8. "八年级四班"
  9. ];
  10. var series_full_data = [12, 20, 15, 8, 7];
  11. var series_max_data = [12, 20, 15, 8, 7];
  12. var series_min_data = [12, 20, 15, 8, 7];
  13. var series_avg_data = [12, 20, 15, 8, 7];
  14. var series_data =[]
  15. var option = {
  16. color: ["#5C99FF", "#ff5f56", "#5EC5C8", "#f1982b", "#6e5eff"],
  17. animation: false,
  18. title: {
  19. text: "%",
  20. x: "left",
  21. y: "top",
  22. textStyle: {
  23. color: "#5F6E82",
  24. fontSize: $.UnitUtil.mm2px(3),
  25. fontWeight: 500,
  26. },
  27. },
  28. legend: {
  29. itemWidth: $.UnitUtil.mm2px(2),
  30. itemHeight: $.UnitUtil.mm2px(2),
  31. top: "bottom",
  32. data: ["A类","B类","C类","D类","E类"],
  33. },
  34. grid: {
  35. top: $.UnitUtil.mm2px(10),
  36. left: 0,
  37. right: 0,
  38. bottom: $.UnitUtil.mm2px(8),
  39. containLabel: true,
  40. },
  41. xAxis: [
  42. {
  43. type: "category",
  44. data: xAxis_data,
  45. axisLabel: {
  46. color: "#5F6E82", //更改坐标轴文字颜色
  47. interval: 0
  48. },
  49. axisTick: {
  50. alignWithLabel: true,
  51. },
  52. boundaryGap: true,
  53. triggerEvent: true,
  54. axisLine: {
  55. show: true, //是否显示轴线
  56. lineStyle: {
  57. color: "#DADADA", //刻度线的颜色
  58. },
  59. },
  60. },
  61. ],
  62. yAxis: [
  63. {
  64. type: "value",
  65. axisTick: {
  66. show: false, //刻度
  67. },
  68. axisLine: {
  69. show: false, //是否显示轴线
  70. lineStyle: {
  71. color: "#DADADA", //刻度线的颜色
  72. },
  73. },
  74. splitLine: {
  75. //网格线
  76. lineStyle: {
  77. type: "dotted", //设置网格线类型 dotted:虚线 solid:实线
  78. },
  79. show: true, //隐藏或显示
  80. },
  81. axisLabel: {
  82. color: "#5F6E82", //更改坐标轴文字颜色
  83. },
  84. },
  85. ],
  86. series: series_data
  87. };
  88. var myEcharts = echarts.init(document.querySelector(".section_2_level #classLevelEcharts"));
  89. myEcharts.clear();
  90. myEcharts.setOption(option);
  91. }
  92. $(function () {
  93. initclassLevelEcharts();
  94. });