43 lines
899 B
Vue
43 lines
899 B
Vue
<template>
|
|
<div id="qtReportEchart" ref="chart"></div>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
name: "qtReportEchart",
|
|
props: {},
|
|
mounted() {
|
|
this.$nextTick(function() {
|
|
this.drawPie();
|
|
});
|
|
},
|
|
methods: {
|
|
drawPie() {
|
|
let myCharts = this.$echarts.init(this.$refs.chart);
|
|
let option = {
|
|
xAxis: {
|
|
type: 'category',
|
|
data: [820, 932, 901, 934, 1290, 1330, 1320]
|
|
},
|
|
yAxis: {
|
|
type: 'value'
|
|
},
|
|
series: [
|
|
{
|
|
data: [820, 932, 901, 934, 1290, 1330, 1320],
|
|
type: 'line',
|
|
smooth: true
|
|
}
|
|
]
|
|
};
|
|
option &&myCharts.setOption(option);
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
<style scoped>
|
|
#qtReportEchart {
|
|
width: 100%;
|
|
height: 100%;
|
|
position: relative;
|
|
}
|
|
</style> |