funnelOption.js
1.33 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
const funnelOption = {
tooltip: {
trigger: 'item',
formatter: function(params, ticket, callback) {
return `${params.data.tooltipName}:${params.data.tooltipValue}`
}
},
series: [
{
name: '漏斗图',
type: 'funnel',
left: '0',
top: 50,
// x2: 80,
bottom: 0,
width: '140px',
height: '120px',
// height: {totalHeight} - y - y2,
min: 0,
max: 60,
minSize: '0%',
maxSize: '100%',
sort: 'descending',
gap: 2,
label: {
show: true,
position: 'right'
},
// silent: true,
labelLine: {
length: 10,
lineStyle: {
width: 1,
type: 'solid'
}
},
itemStyle: {
borderColor: '#fff',
borderWidth: 1
},
emphasis: {
label: {
fontSize: 20
}
},
data: [
{ value: 60, name: '流量总量', tooltipName: '流量总量', tooltipValue: '100', itemStyle: { color: 'rgba(9,71,198,1)' } },
{ value: 40, name: '已到店', tooltipName: '总到店数', tooltipValue: '100', itemStyle: { color: 'rgba(43,154,255,1)' } },
{ value: 20, name: '已转化', tooltipName: '总升级数', tooltipValue: '100', itemStyle: { color: 'rgba(255,170,0,1)' } }
]
}
]
}
export default funnelOption