1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- //各班等级分析
- function initclassLevelEcharts(){
- var xAxis_data = [
- "全年级",
- "八年级一班",
- "八年级二班",
- "八年级三班",
- "八年级四班"
- ];
- var series_full_data = [12, 20, 15, 8, 7];
- var series_max_data = [12, 20, 15, 8, 7];
- var series_min_data = [12, 20, 15, 8, 7];
- var series_avg_data = [12, 20, 15, 8, 7];
- var series_data =[]
- var option = {
- color: ["#5C99FF", "#ff5f56", "#5EC5C8", "#f1982b", "#6e5eff"],
- animation: false,
- title: {
- text: "%",
- x: "left",
- y: "top",
- textStyle: {
- color: "#5F6E82",
- fontSize: $.UnitUtil.mm2px(3),
- fontWeight: 500,
- },
- },
- legend: {
- itemWidth: $.UnitUtil.mm2px(2),
- itemHeight: $.UnitUtil.mm2px(2),
- top: "bottom",
- data: ["A类","B类","C类","D类","E类"],
- },
- grid: {
- top: $.UnitUtil.mm2px(10),
- left: 0,
- right: 0,
- bottom: $.UnitUtil.mm2px(8),
- containLabel: true,
- },
- xAxis: [
- {
- type: "category",
- data: xAxis_data,
- axisLabel: {
- color: "#5F6E82", //更改坐标轴文字颜色
- interval: 0
- },
- axisTick: {
- alignWithLabel: true,
- },
- boundaryGap: true,
- triggerEvent: true,
- axisLine: {
- show: true, //是否显示轴线
- lineStyle: {
- color: "#DADADA", //刻度线的颜色
- },
- },
- },
- ],
- yAxis: [
- {
- type: "value",
- axisTick: {
- show: false, //刻度
- },
- axisLine: {
- show: false, //是否显示轴线
- lineStyle: {
- color: "#DADADA", //刻度线的颜色
- },
- },
- splitLine: {
- //网格线
- lineStyle: {
- type: "dotted", //设置网格线类型 dotted:虚线 solid:实线
- },
- show: true, //隐藏或显示
- },
- axisLabel: {
- color: "#5F6E82", //更改坐标轴文字颜色
- },
- },
- ],
- series: series_data
- };
- var myEcharts = echarts.init(document.querySelector(".section_2_level #classLevelEcharts"));
- myEcharts.clear();
- myEcharts.setOption(option);
- }
-
- $(function () {
- initclassLevelEcharts();
- });
|