|
@@ -17,8 +17,7 @@ export default {
|
17
|
17
|
const myChart = this.$echarts.init(this.$refs.MapMountNode);
|
18
|
18
|
//设置图表属性
|
19
|
19
|
// 经营数据
|
20
|
|
- const option = {
|
21
|
|
- color: ["#91cc75"],
|
|
20
|
+ const option = {
|
22
|
21
|
title: {
|
23
|
22
|
text: "产品数据",
|
24
|
23
|
left: "center",
|
|
@@ -26,45 +25,31 @@ export default {
|
26
|
25
|
// color: "#6d767e",
|
27
|
26
|
// },
|
28
|
27
|
},
|
29
|
|
- tooltip: {
|
30
|
|
- trigger: "axis",
|
31
|
|
- axisPointer: {
|
32
|
|
- type: "shadow",
|
33
|
|
- },
|
34
|
|
- },
|
|
28
|
+
|
35
|
29
|
grid: {
|
36
|
|
- left: "3%",
|
37
|
|
- right: "4%",
|
38
|
|
- bottom: "3%",
|
39
|
|
- containLabel: true,
|
|
30
|
+ left: 60,
|
|
31
|
+ },
|
|
32
|
+ xAxis: {
|
|
33
|
+ type: "category",
|
|
34
|
+ data: ["购买订单数", "购买人数", "购买金额"],
|
|
35
|
+ axisLabel: { interval: 0, rotate: 30 },
|
|
36
|
+ },
|
|
37
|
+ yAxis: {
|
|
38
|
+ type: "value",
|
40
|
39
|
},
|
41
|
|
- xAxis: [
|
42
|
|
- {
|
43
|
|
- type: "value",
|
44
|
|
- },
|
45
|
|
- ],
|
46
|
|
- yAxis: [
|
47
|
|
- {
|
48
|
|
- type: "category",
|
49
|
|
- axisTick: {
|
50
|
|
- show: false,
|
51
|
|
- },
|
52
|
|
- data: ["购买订单数", "购买人数", "购买金额"],
|
53
|
|
- },
|
54
|
|
- ],
|
55
|
40
|
series: [
|
56
|
41
|
{
|
57
|
|
- name: "数量",
|
|
42
|
+ data: [
|
|
43
|
+ this.listData.product_data.order,
|
|
44
|
+ this.listData.product_data.people,
|
|
45
|
+ this.listData.product_data.money,
|
|
46
|
+ ],
|
58
|
47
|
type: "bar",
|
59
|
|
- label: {
|
60
|
|
- show: true,
|
61
|
|
- position: "inside",
|
62
|
|
- },
|
63
|
48
|
itemStyle: {
|
64
|
49
|
normal: {
|
65
|
50
|
label: {
|
66
|
51
|
show: true, //开启显示数值
|
67
|
|
- position: "right", //数值在上方显示
|
|
52
|
+ position: "top", //数值在上方显示
|
68
|
53
|
textStyle: {
|
69
|
54
|
//数值样式
|
70
|
55
|
color: "#9b9ca2", //字体颜色
|
|
@@ -73,18 +58,9 @@ export default {
|
73
|
58
|
},
|
74
|
59
|
},
|
75
|
60
|
},
|
76
|
|
- emphasis: {
|
77
|
|
- focus: "series",
|
78
|
|
- },
|
79
|
|
- data: [
|
80
|
|
- this.listData.product_data.order,
|
81
|
|
- this.listData.product_data.people,
|
82
|
|
- this.listData.product_data.money,
|
83
|
|
- ],
|
84
|
61
|
},
|
85
|
62
|
],
|
86
|
63
|
};
|
87
|
|
-
|
88
|
64
|
//数据绑定到表格
|
89
|
65
|
myChart.setOption(option);
|
90
|
66
|
window.addEventListener("resize", function () {
|