|
@@ -34,6 +34,7 @@ export function getScoreBarOptions(dataObj) {
|
|
|
return {
|
|
|
animation: animationIsOpen,
|
|
|
textStyle: textStyle,
|
|
|
+ color: colors,
|
|
|
grid: {
|
|
|
left: 50,
|
|
|
top: 40,
|
|
@@ -109,14 +110,7 @@ export function getBarsOptions(dataObj) {
|
|
|
return {
|
|
|
animation: animationIsOpen,
|
|
|
textStyle: textStyle,
|
|
|
- color: [
|
|
|
- "rgba(61, 160, 255, 0.8)",
|
|
|
- "#4bcb74",
|
|
|
- "rgba(151, 94, 229, 0.8)",
|
|
|
- "#999999",
|
|
|
- "rgba(67, 80, 136, 0.8)",
|
|
|
- "rgba(250, 212, 68, 0.8)",
|
|
|
- ],
|
|
|
+ color: colors,
|
|
|
legend: {
|
|
|
itemGap: 30,
|
|
|
itemWidth: 14,
|
|
@@ -380,6 +374,113 @@ export function getBarPointTopicOptions(dataObj) {
|
|
|
series: series,
|
|
|
};
|
|
|
}
|
|
|
+export function getBarTeachersOptions(datas) {
|
|
|
+ let xAxisData = [
|
|
|
+ // "实考人数",
|
|
|
+ "最高分",
|
|
|
+ "最低分",
|
|
|
+ "及格人数",
|
|
|
+ "及格率",
|
|
|
+ "优秀人数",
|
|
|
+ "优秀率",
|
|
|
+ "平均分",
|
|
|
+ // "相对平均分",
|
|
|
+ ];
|
|
|
+
|
|
|
+ let legendData = datas.map(function (item) {
|
|
|
+ return item.name;
|
|
|
+ });
|
|
|
+ let barWidth = 22 - datas.length * 2;
|
|
|
+ let series = datas.map(function (item) {
|
|
|
+ return {
|
|
|
+ type: "bar",
|
|
|
+ data: [
|
|
|
+ // item.totalCount,
|
|
|
+ item.maxScore,
|
|
|
+ item.minScore,
|
|
|
+ item.passCount,
|
|
|
+ item.passRate,
|
|
|
+ item.excellentCount,
|
|
|
+ item.excellentRate,
|
|
|
+ item.avgScore,
|
|
|
+ // item.relativeAvgScore,
|
|
|
+ ],
|
|
|
+ barWidth: barWidth,
|
|
|
+ name: item.name,
|
|
|
+ };
|
|
|
+ });
|
|
|
+
|
|
|
+ return {
|
|
|
+ animation: animationIsOpen,
|
|
|
+ textStyle: textStyle,
|
|
|
+ color: colors,
|
|
|
+ legend: {
|
|
|
+ data: legendData,
|
|
|
+ left: "center",
|
|
|
+ bottom: 10,
|
|
|
+ itemGap: 20,
|
|
|
+ itemWidth: 14,
|
|
|
+ textStyle: {
|
|
|
+ fontSize: 19,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ grid: {
|
|
|
+ show: true,
|
|
|
+ top: 30,
|
|
|
+ bottom: 90,
|
|
|
+ left: 50,
|
|
|
+ right: 50,
|
|
|
+ borderColor: "rgba(230,230,230,1)",
|
|
|
+ },
|
|
|
+ xAxis: {
|
|
|
+ type: "category",
|
|
|
+ data: xAxisData,
|
|
|
+ axisTick: {
|
|
|
+ show: false,
|
|
|
+ },
|
|
|
+ splitArea: {
|
|
|
+ show: true,
|
|
|
+ areaStyle: {
|
|
|
+ color: ["rgba(255,255,255,1)", "rgba(250,250,250,1)"],
|
|
|
+ },
|
|
|
+ },
|
|
|
+ splitLine: {
|
|
|
+ show: true,
|
|
|
+ lineStyle: {
|
|
|
+ color: "rgba(233,233,233,1)",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ axisLabel: {
|
|
|
+ fontSize: 18,
|
|
|
+ margin: 12,
|
|
|
+ interval: 0,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: "value",
|
|
|
+ z: 1,
|
|
|
+ axisTick: {
|
|
|
+ show: false,
|
|
|
+ },
|
|
|
+ axisLine: {
|
|
|
+ lineStyle: {
|
|
|
+ color: "rgba(233,233,233,1)",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ splitLine: {
|
|
|
+ show: true,
|
|
|
+ lineStyle: {
|
|
|
+ color: "rgba(233,233,233,1)",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ axisLabel: {
|
|
|
+ fontSize: 16,
|
|
|
+ color: "#555",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ series: series,
|
|
|
+ };
|
|
|
+}
|
|
|
|
|
|
// other
|
|
|
export function getBarPointGradeOptions(dataObj) {
|
|
@@ -580,114 +681,6 @@ export function getBarPointGradeOptions(dataObj) {
|
|
|
};
|
|
|
}
|
|
|
|
|
|
-export function getBarTeachersOptions(datas) {
|
|
|
- let xAxisData = [
|
|
|
- "实考人数",
|
|
|
- "最高分",
|
|
|
- "最低分",
|
|
|
- "及格人数",
|
|
|
- "及格率",
|
|
|
- "优秀人数",
|
|
|
- "优秀率",
|
|
|
- "平均分",
|
|
|
- "相对平均分",
|
|
|
- ];
|
|
|
-
|
|
|
- let legendData = datas.map(function (item) {
|
|
|
- return item.name;
|
|
|
- });
|
|
|
- let barWidth = 22 - datas.length * 2;
|
|
|
- let series = datas.map(function (item, index) {
|
|
|
- return {
|
|
|
- type: "bar",
|
|
|
- data: [
|
|
|
- item.totalCount,
|
|
|
- item.maxScore,
|
|
|
- item.minScore,
|
|
|
- item.passCount,
|
|
|
- item.passRate100,
|
|
|
- item.excellentCount,
|
|
|
- item.excellentRate100,
|
|
|
- item.avgScore,
|
|
|
- item.relativeAvgScore,
|
|
|
- ],
|
|
|
- barWidth: barWidth,
|
|
|
- name: item.name,
|
|
|
- };
|
|
|
- });
|
|
|
-
|
|
|
- return {
|
|
|
- animation: animationIsOpen,
|
|
|
- textStyle: textStyle,
|
|
|
- color: colors,
|
|
|
- legend: {
|
|
|
- data: legendData,
|
|
|
- left: "center",
|
|
|
- bottom: 10,
|
|
|
- itemGap: 20,
|
|
|
- itemWidth: 14,
|
|
|
- textStyle: {
|
|
|
- fontSize: 19,
|
|
|
- },
|
|
|
- },
|
|
|
- grid: {
|
|
|
- show: true,
|
|
|
- left: 80,
|
|
|
- right: 50,
|
|
|
- top: 100,
|
|
|
- bottom: 100,
|
|
|
- borderColor: "rgba(230,230,230,1)",
|
|
|
- },
|
|
|
- xAxis: {
|
|
|
- type: "category",
|
|
|
- data: xAxisData,
|
|
|
- axisTick: {
|
|
|
- show: false,
|
|
|
- },
|
|
|
- splitArea: {
|
|
|
- show: true,
|
|
|
- areaStyle: {
|
|
|
- color: ["rgba(255,255,255,1)", "rgba(250,250,250,1)"],
|
|
|
- },
|
|
|
- },
|
|
|
- splitLine: {
|
|
|
- show: true,
|
|
|
- lineStyle: {
|
|
|
- color: "rgba(233,233,233,1)",
|
|
|
- },
|
|
|
- },
|
|
|
- axisLabel: {
|
|
|
- fontSize: 18,
|
|
|
- margin: 12,
|
|
|
- interval: 0,
|
|
|
- },
|
|
|
- },
|
|
|
- yAxis: {
|
|
|
- type: "value",
|
|
|
- z: 1,
|
|
|
- axisTick: {
|
|
|
- show: false,
|
|
|
- },
|
|
|
- axisLine: {
|
|
|
- lineStyle: {
|
|
|
- color: "rgba(233,233,233,1)",
|
|
|
- },
|
|
|
- },
|
|
|
- splitLine: {
|
|
|
- show: true,
|
|
|
- lineStyle: {
|
|
|
- color: "rgba(233,233,233,1)",
|
|
|
- },
|
|
|
- },
|
|
|
- axisLabel: {
|
|
|
- fontSize: 16,
|
|
|
- color: "#555",
|
|
|
- },
|
|
|
- },
|
|
|
- series: series,
|
|
|
- };
|
|
|
-}
|
|
|
-
|
|
|
export function getBarTeacherGradeOptions(datas) {
|
|
|
let title = datas.name + "_任课班级成绩分析";
|
|
|
let symbolCircle =
|