funnelOption.js 1021 Bytes
const funnelOption = {
	tooltip: {
		trigger: "item",
		formatter(params) {
			return `${params.data.tooltipName}:${params.data.tooltipValue}`;
		},
	},
	series: [{
		name: "漏斗图",
		type: "funnel",
		left: "0",
		top: 50,
		bottom: 0,
		width: "140px",
		height: "120px",
		min: 0,
		max: 60,
		minSize: "0%",
		maxSize: "100%",
		sort: "descending",
		gap: 2,
		label: { show: true, position: "right" },
		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;