qinpu-option.js
2.29 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
export const qinpuOption = {
// 鼠标放置时的提示框
tooltip: {
trigger: "item",
formatter: "{b}<br/>{c} (分)",
},
// 可视化映射组件
visualMap: {
show: true,
x: "left",
y: "58%", // 设置左边提示的位置
itemWidth: 10,
itemHeight: 10,
sspliList: [
{ start: 0, end: 20, label: "测试1", color: "#29A4D7" },
{ start: 20, end: 40, label: "测试2", color: "#DD970B" },
{ start: 40, end: 60, label: "测试3", color: "#E64B47" },
{ start: 60, end: 80, label: "测试4", color: "#E6C249" },
{ start: 80, end: 100, label: "测试5", color: "#B52621" },
],
textStyle: {
color: "#fff", // 文字颜色
},
},
// 系列列表
series: [
{
name: "青浦区",
type: "map",
mapType: "青浦区",
// 设置每一块中的具体文字
label: {
normal: {
show: true,
formatter: function (params) {
return params.name + "\n" + params.value;
},
textStyle: {
fontWeight: "normal",
fontSize: 12,
color: "#fff",
},
},
},
// 设置每一块的颜色
emphasis: {
show: true,
label: {
textStyle: {
color: "#fff",
},
itemStyle: {
areaColor: "#CCC",
},
},
itemStyle: {
normal: {
borderWidth: 0.5, // 边际线
borderColor: "#fff", // 边际线颜色
},
},
},
data: [
{
name: "朱家角镇",
value: [137.80,11, 217, 28, 284],
},
{
name: "赵巷镇",
value: [41.01 ,5 ,65 ,8 ,156],
},
{
name: "徐泾镇",
value: [38.55 ,10, 80, 9, 145],
},
{
name: "华新镇",
value: [47.49 ,2 ,36 ,19 ,228],
},
{
name: "重固镇",
value: [25.14, 2 ,31 ,8 ,112],
},
{
name: "白鹤镇",
value: [57.33, 3, 18 ,21, 324 ],
},
{
name: "练塘镇",
value: [92.90 ,4 ,31 ,25 ,407],
},
{
name: "金泽镇",
value: [108.42, 5, 54, 30, 424],
},
],
},
],
};