option = {
color : [
‘rgba(255, 69, 0, 0.5)’,
‘rgba(255, 150, 0, 0.5)’,
‘rgba(255, 200, 0, 0.5)’,
‘rgba(155, 200, 50, 0.5)’,
‘rgba(55, 200, 100, 0.5)’
],
title : {
text: ‘漏斗图’
},
tooltip : {
show: false,
trigger: ‘item’,
formatter: “{a}
{b} : {c}%
”
},
toolbox: {
show : true,
feature : {
mark : {show: true},
dataView : {show: true, readOnly: false},
restore : {show: true},
saveAsImage : {show: true}
}
},
calculable : true,
series : [
{
name:‘预期’,
type:‘funnel’,
x: ‘10%’,
width: ‘80%’,
itemStyle: {
normal: {
label: {
formatter: ‘{b}’
},
labelLine: {
show : false
}
},
emphasis: {
label: {
position:‘inside’,
formatter: ‘{b}: {c}%’
}
}
},
data:[
{value:90, name:‘保单转化’},
{value:20, name:‘生成订单’},
{value:40, name:‘投保按钮’},
{value:60, name:‘参与’},
{value:80, name:‘打开’},
{value:100, name:‘送到’}
]
},
{
name:‘实际’,
type:‘funnel’,
x: ‘10%’,
width: ‘80%’,
maxSize: ‘80%’,
itemStyle: {
normal: {
borderColor: ‘#fff’,
borderWidth: 2,
label: {
position: ‘inside’,
formatter: ‘{b}:{c}%’,
textStyle: {
color: ‘#fff’
}
}
},
emphasis: {
label: {
position:‘inside’,
formatter: ‘{b} : {c}%’
}
}
},
data:[
{value:5, name:‘100人’},
{value:10, name:‘200人’},
{value:20, name:‘400人’},
{value:30, name:‘500人’},
{value:50, name:‘800人’},
{value:88, name:‘1000人’}
]
}
]
};
echarts漏斗图配置
最新推荐文章于 2023-12-15 09:39:17 发布