personCharts.vue
1.14 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
<template>
<div class="_chart">
<div class="_chartTitle">
<h3>人群属性</h3>
<span>统计近30天累计消费人群数据</span>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div id="consumptionLevel" style="width: 600px;height:400px"></div>
</div>
<div class="col-sm-6">
<div id="vipDistribute" style="width: 600px;height:400px"></div>
</div>
</div>
</template>
<script type="text/javascript">
var echarts = require('echarts');
var getOption = require('./barChartOption');
module.exports = {
data:function() {
return {
name:"6666"
}
},
ready:function(){
var consumptionLevel = echarts.init(document.getElementById('consumptionLevel'));
var vipDistribute = echarts.init(document.getElementById('vipDistribute'));
var option = getYOption();
// 使用刚指定的配置项和数据显示图表。
consumptionLevel.setOption(option);
vipDistribute.setOption(option);
}
}
</script>