export function createFunnelOption(items) {
  return {
    animationDuration: 650,
    color: ["#277be8", "#10a6c4", "#13b5b0", "#17c99d"],
    series: [
      {
        bottom: 6,
        data: items.map((item) => ({ name: item.name, value: Math.max(item.rate * 100, 8) })),
        gap: 9,
        itemStyle: { borderColor: "rgba(220, 250, 255, 0.92)", borderWidth: 1.2, shadowBlur: 14, shadowColor: "rgba(39, 228, 245, 0.16)" },
        label: { color: "#e8f6ff", distance: 16, formatter: "{b}", fontSize: 12, lineHeight: 16, position: "right" },
        labelLine: { show: false },
        left: "5%",
        maxSize: "88%",
        minSize: "42%",
        sort: "descending",
        top: 4,
        type: "funnel",
        width: "58%"
      }
    ],
    tooltip: { backgroundColor: "#08243a", borderColor: "#1a5f82", textStyle: { color: "#e9f6ff" } }
  };
}
