ViewChart.vue
1.71 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
71
72
73
74
75
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-26 10:22:41
* @LastEditors: huyue
* @LastEditTime: 2023-08-16 16:28:43
* @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">
<LineChart domId="sumChart" boxHeight="17.54vh" :privateList="privateList"></LineChart>
</div>
<div class="pie-chart">
<Age></Age>
<Price></Price>
<BuyCar></BuyCar>
<Mileage></Mileage>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import Age from './Age.vue'
import Price from './Price.vue'
import BuyCar from './BuyCar.vue'
import Mileage from './Mileage.vue'
import LineChart from './LineChart.vue'
import { userMixin } from '../../../mixins/index'
export default {
name: 'ViewChart',
mixins: [userMixin],
components: {
Age,
Price,
BuyCar,
Mileage,
LineChart
},
data() {
return {
privateList: []
}
},
created() {
this.getDistribution()
},
mounted() {
this.$bus.$on('drawPrivateChart', data => {
this.privateList = data
})
},
methods: {}
}
</script>
<style scoped lang="scss">
.view-chart {
height: 19.39vh;
margin: 0.98vh 0;
.line-chart {
width: 25.14vw;
height: 100%;
background: #071735;
margin-right: 0.56vw;
}
.pie-chart {
width: 26.52vw;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
}
}
</style>