echarts图表加入了柱状图
This commit is contained in:
parent
f41f616cd7
commit
ba08f4ac23
|
@ -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%;
|
||||
|
|
Loading…
Reference in New Issue