option
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: '漏斗圖', subtext: '純屬虛構' }, tooltip : { trigger: 'item', formatter: "{a}
{b} : {c}%" }, toolbox: { show : true, feature : { mark : {show: true}, dataView : {show: true, readOnly: false}, restore : {show: true}, saveAsImage : {show: true} } }, legend: { data : ['展現','點擊','訪問','咨詢','訂單'] }, 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:60, name:'訪問'}, {value:40, name:'咨詢'}, {value:20, 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: '{c}%', textStyle: { color: '#fff' } } }, emphasis: { label: { position:'inside', formatter: '{b}實際 : {c}%' } } }, data:[ {value:30, name:'訪問'}, {value:10, name:'咨詢'}, {value:5, name:'訂單'}, {value:50, name:'點擊'}, {value:80, name:'展現'} ] } ] };
刷 新
切換主題