echarts图表加入了柱状图

This commit is contained in:
Cool 2023-11-16 17:47:20 +08:00
parent f41f616cd7
commit ba08f4ac23
1 changed files with 32 additions and 12 deletions

View File

@ -390,17 +390,35 @@ export default {
//
let dateIndex = this.dates.indexOf(item.batch);
if (!this.LineChartData[collegeIndex]) {
this.LineChartData[collegeIndex] = {
name: item.college,
type: 'line',
data: [],
label: {
show: true,
position: 'top'
}
};
this.LineChartData[collegeIndex] = [
{
name: item.college,
type: 'line',
data: [],
label: {
show: true,
position: 'top'
}
},
{
name: item.college,
type: 'bar',
data: [],
//
barWidth: 50,
//
itemStyle: {
color: 'rgba(84,122,198,0.9)'
},
},
]
}
this.LineChartData[collegeIndex].data[dateIndex] = parseFloat(item.passRate.toFixed(2));
this.LineChartData[collegeIndex][0].data[dateIndex] = parseFloat(item.passRate.toFixed(2));
this.LineChartData[collegeIndex][1].data[dateIndex] = parseFloat(item.passRate.toFixed(2));
});
this.activeKey = 0
this.darwLine();
@ -495,11 +513,13 @@ export default {
display: block;
width: 100%;
}
.objectHr{
.objectHr {
border: none;
border-top: 1px dashed #ece8e8;
}
/* #main {
width: 100%;
height: 100%;