import { D as i } from "./index-a857af7d.mjs";
import { a as n, B as o } from "./echartsUtil-c8c4d6d3.mjs";
import "vue";
function r({ config: t, data: a, contextWrap: p }) {
  const e = i(t.option || "{}");
  return n(e, t, a), { "~": "div", "#": {
    "~component": o,
    option: e,
    theme: "default"
    // style: {
    //   height: config.height || '100%',
    //   width: config.width || '100%'
    // },
    // ...buildDefaultEvents(contextWrap)
  } };
}
const l = {
  title: {
    text: "Funnel"
  },
  tooltip: {
    trigger: "item",
    formatter: "{a} <br/>{b} : {c}%"
  },
  toolbox: {
    feature: {
      dataView: { readOnly: !1 },
      restore: {},
      saveAsImage: {}
    }
  },
  legend: {
    data: ["Show", "Click", "Visit", "Inquiry", "Order"]
  },
  series: [
    {
      name: "Funnel",
      type: "funnel",
      left: "10%",
      top: 60,
      bottom: 60,
      width: "80%",
      min: 0,
      max: 100,
      minSize: "0%",
      maxSize: "100%",
      sort: "descending",
      gap: 2,
      label: {
        show: !0,
        position: "inside"
      },
      labelLine: {
        length: 10,
        lineStyle: {
          width: 1,
          type: "solid"
        }
      },
      itemStyle: {
        borderColor: "#fff",
        borderWidth: 1
      },
      emphasis: {
        label: {
          fontSize: 20
        }
      }
    }
  ]
}, s = [
  { value: 60, name: "Visit" },
  { value: 40, name: "Inquiry" },
  { value: 20, name: "Order" },
  { value: 80, name: "Click" },
  { value: 100, name: "Show" }
], f = {
  key: "_echartsRaw",
  name: "Echarts raw",
  description: "",
  icon: "mdiChartWaterfall",
  sequence: 2,
  transform: r,
  editor: {
    basic: {
      init: { wdith: "640px", height: "480px", option: JSON.stringify(l, null, 2) },
      ui: function(t) {
        return [
          {
            "~component": "el-input",
            "~label": "Option",
            "~prop": "option",
            type: "textarea",
            rows: 20
          }
        ];
      }
    },
    data: {
      //readonly:true,
      type: "Array",
      init: {
        mode: "fixed",
        dataContent: JSON.stringify(s, null, 2)
      }
    },
    display: {
      init: { style: { width: "100%", height: "480px" } }
    }
  }
};
export {
  f as default
};
