ViewChart.vue
1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-26 10:22:41
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-27 14:30:38
* @FilePath: \dj-data-view\src\components\ViewChart.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="view-chart flex">
<div class="line-chart">
<line-chart domId="sumChart" boxHeight="17.54vh" :privateList="privateList"></line-chart>
</div>
<div class="pie-chart">
<Age></Age>
<Price></Price>
<BuyCar></BuyCar>
<Mileage></Mileage>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import * as echarts from 'echarts'
import datas from '../utils/data'
import Age from '../views/user/age.vue'
import Price from '../views/user/price'
import BuyCar from '../views/user/buyCar'
import Mileage from '../views/user/mileage'
export default {
name: 'ViewChart',
components: {
Age,
Price,
BuyCar,
Mileage
},
data() {
return {
privateList: []
}
},
mounted() {
this.$bus.$on('drawPrivateChart', data => {
this.privateList = data
})
},
methods: {}
}
</script>
<style scoped lang="scss">
.view-chart {
height: 19.51vh;
margin: 0.98vh 0;
.line-chart {
width: 26.25vw;
height: 100%;
background: #0b0e31;
margin-right: 0.56vw;
}
.pie-chart {
width: 23.28vw;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
}
}
</style>