(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d0b6b"],{"68c6":function(e,t,a){"use strict";a.r(t);var n=a("7a23");const c={class:"data-designer-chart-instance data-designer-chart-view-funnel",ref:"designerChartViewRef"},r={class:"data-designer-chart-container",ref:"designerChartViewInnerRef"};function i(e,t,a,i,l,o){return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",c,[Object(n["createElementVNode"])("div",r,null,512)],512)}var l=a("f04e"),o=a("7104"),s=a.n(o),d=a("917c"),h=a("a955"),b=a("3b20"),f=a("6fde"),u=Object(n["defineComponent"])({props:Object.assign(Object.assign({},b["h"].props),{setChartInstance:{type:Function}}),data(){return{chartType:[h["N"].BASE_FUNNEL]}},mixins:[b["h"]],setup(e,{emit:t}){let a,c=Object(n["ref"])();const r=Object(n["ref"])(null),i=Object(n["ref"])(null);function o(){return c.value=new d["Chart"](Object.assign(Object.assign(Object.assign({},Object(b["f"])()),e.chartCfg||{}),{padding:e.chartCfg&&e.chartCfg.height?[50,50,50,40]:[50,130,50,100],container:i.value,supportCSSTransform:!0})),c.value.on("element:click",t=>{var a,n,r;const i=Object(b["w"])(t.data.data,null===(a=e.getCurrentDrillDownConfig)||void 0===a?void 0:a.call(e),e.chartData.id);i&&(null===(n=e.pushBreadcrumbEvent)||void 0===n||n.call(e,i)),Object(b["s"])(e.chartData,e.openDomGoto),null===(r=e.setChartInstance)||void 0===r||r.call(e,c)}),c.value}Object(n["onMounted"])(()=>{o(),Object(b["i"])(r.value,c.value)});let u={};Object(n["watch"])(()=>e.chartData,t=>{var a;t&&c.value&&Object(f["wc"])(t)&&(e.chartCfg&&e.chartCfg.width&&e.chartCfg.height&&(null===(a=c.value)||void 0===a||a.changeSize(+e.chartCfg.width,e.chartCfg.height)),Object(b["u"])(t,u)?(u=Object(l["U"])(t),p(c.value,t,e.chartDataResult)):u=Object(l["U"])(t))},{immediate:!0,deep:!0});let O={};function j(e,t){O=Object(l["U"])(t),c.value||o(),p(c.value,e,t)}Object(n["watch"])(()=>e.chartDataResult,()=>{Object(f["Kc"])(O,e.chartDataResult)||(r.value?j(e.chartData,e.chartDataResult):Object(n["onMounted"])(()=>{j(e.chartData,e.chartDataResult)}))},{immediate:!0,deep:!0});const g=Object(f["N"])();function p(t,a,n){if(!Object(b["v"])(a))return;if(!Object(f["Kc"])(a,n.chartData))return;v(t,a);const c=e.chartDataResult.data||[];e.chartDataResult&&e.chartDataResult.totalSize>h["h"]&&Object(b["t"])(a,u)&&g();const i=(new s.a.DataView).source(c.length>h["h"]?c.slice(0,h["h"]):c);i.transform({type:"map",callback(e){return e[h["e"]]=parseFloat(((e[h["f"]]||0)/i.rows[0][h["f"]]).toFixed(2)),e}}),t.data(i.rows),t.once("beforepaint",()=>{Object(f["jb"])(t,a)}),t.render(),Object(f["tc"])(a)&&Object(b["i"])(r.value,t)}function v(t,n){t||(t=o()),t.clear();const{scales:c,dimensions:r}=Object(f["Kb"])(n);if(!t.axis)return;t.axis(!1),t.tooltip({showTitle:!1,showMarkers:!1,itemTpl:`\n          <li style="margin-bottom:4px;list-style-type:none;padding: 0;">\n            <div style="overflow: hidden">\n              <div style="float: left">\n                <span style="background-color:{color};" class="g2-tooltip-marker"></span>\n                {${h["d"]}}${r.length?"":`: {${h["f"]}}`}\n              </div>\n              <div style="float: right;padding-left: 5px;">\n                {${h["e"]}}\n              </div>\n            </div>\n            ${r.length&&c.length?`<div style="padding-left: 16px;line-height: 16px;">${c[0].chartField.displayName}:{${h["f"]}}</div>`:""}\n          </li>`}),t.coordinate("rect").transpose().scale(1,-1);const i=Object(f["V"])(n);if(t.scale(i),c.length){const r=h["d"],i=h["e"],o={fields:[r,i,h["f"]]},s=e.chartDataResult.data||[];let d=f["c"];if(Object(f["Wc"])(e.config)){const t=Object(f["Ub"])(e.config);d=t.colorCfg}const b=Object(f["Yb"])(d.startColor,d.endColor,s.length||10).reverse();a=t.interval().adjust("symmetric").position(o).shape("funnel").color(h["d"],Object(l["U"])(b).reverse()).tooltip(`${h["d"]}*${h["f"]}*${h["e"]}`,(e,t,a)=>({[h["d"]]:e,[h["f"]]:Object(f["Ob"])(c&&c[0],t,h["mb"].TOOLTIP),[h["e"]]:Object(f["tb"])(a)})),Object(f["r"])(t,e.config,n,a),a.animate({appear:{animation:"fade-in"},update:{annotation:"fade-in"}})}Object(f["s"])(t,e.config,n),Object(f["kb"])(t),Object(f["qd"])(t,n,e.config)}return Object(b["E"])(e,c,v),Object(b["D"])(e,c),Object(n["onBeforeUnmount"])(()=>{c.value.off()}),{designerChartViewRef:r,designerChartViewInnerRef:i,chart:c}}}),O=a("6b0d"),j=a.n(O);const g=j()(u,[["render",i]]);t["default"]=g}}]);