<template>
<div id="project-attendance">
<div class="project-attendance-chart-view">
<div class="Chart_one" id="myChartCurve"></div>
</div>
</div>
</template>
<script>
export default {
data(){
return{
list: []
}
},
mounted() {
this.drawLine()
},
methods: {
drawLine() {
let myChart = this.$echarts.init(document.getElementById('myChartCurve'))
let options = {
color: ["#2DECF2", '#1A8FF2'],
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
grid: {
left: '7%',
right: '3%',
top: '12%',
bottom: '1%',
containLabel: true
},
legend: {
data: ['出勤人数', '在册人数'],
textStyle: {
fontSize: '12',
color: '#fff'
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: [],
axisLabel: {
interval: 0,
rotate: 40,
textStyle: {
fontSize: '12',
color: '#fff'
}
},
},
yAxis: {
type: 'value',
// splitLine:{show: false},//去除网格线
axisLabel: {
textStyle: {
fontSize: '12',
color: '#fff'
}
},
splitLine: { //分割线
lineStyle:{
width: 2,
color:"rgba(48, 98, 105, 0.3)"
}
}
},
series: [{
name: '出勤人数',
smooth: true,
symbol: 'none',
data: [],
type: 'line',
// 区域填充样式 设置渐变颜色
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0, color: 'rgba(45, 236, 242, 0.4)' // 0% 处的颜色
}, {
offset: 1, color: 'rgba(45, 236, 242, 0.1)' // 100% 处的颜色
}],
global: false // 缺省为 false
}
},
},
{
name: '在册人数',
smooth: true,
symbol: 'none',
data: [],
type: 'line',
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0, color: 'rgba(26, 143, 242, 0.4)' // 0% 处的颜色
}, {
offset: 1, color: 'rgba(26, 143, 242, 0.1)' // 100% 处的颜色
}],
global: false // 缺省为 false
}
},
}]
};
myChart.setOption(options)
},
}
}
</script>
<style lang="less" scoped>
#project-attendance {
width: 100%;
height: 100%;
.project-attendance-chart-view{
width: 100%;
height: 100%;
.Chart_one{
width: 100%;
height: 100%;
padding: 10px;
box-sizing: border-box;
}
}
}
</style>
该吃午饭了,各位选菜吧。蒸羊羔,蒸熊掌,蒸鹿尾儿,烧花鸭,烧雏鸡,烧子鹅,卤猪,卤鸭,酱鸡,腊肉,松花小肚儿,晾肉香肠,什锦苏盘,熏鸡白肚,清蒸八宝猪,江米酿鸭子