(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d21f821"],{d9b8:function(t,e,a){"use strict";a.r(e);var c=a("7a23");const n={class:"data-designer-chart-instance data-designer-chart-view-bar",ref:"designerChartViewRef"},i={class:"data-designer-chart-container",ref:"designerChartViewInnerRef"};function r(t,e,a,r,o,l){return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",n,[Object(c["createElementVNode"])("div",i,null,512)],512)}var o=a("f04e"),l=a("917c"),s=a("a955"),d=a("3b20"),h=a("6fde"),u=Object(c["defineComponent"])({props:Object.assign(Object.assign({},d["h"].props),{setChartInstance:{type:Function}}),data(){return{chartType:[s["N"].BASE_COLUMN,s["N"].MULTI_COLUMN,s["N"].MULTI_BAR,s["N"].MULTI_BAR]}},mixins:[d["h"]],setup:function(t,{emit:e}){let a;const n=Object(c["ref"])(null),i=Object(c["ref"])(null),r={intervalIds:[]},u=Object(c["ref"])();function b(){const e=Object.assign(Object.assign(Object.assign({},Object(d["f"])()),t.chartCfg||{}),{container:i.value,supportCSSTransform:!0});return Object(h["uc"])(t.config)&&Object(h["cc"])(t.chartData)&&(e.appendPadding=[20,10,20,10]),u.value=new l["Chart"](e),u.value.on("element:click",e=>{var a,c;const n=Object(d["w"])(e.data.data,null===(a=t.getCurrentDrillDownConfig)||void 0===a?void 0:a.call(t),t.chartData.id);n&&(null===(c=t.pushBreadcrumbEvent)||void 0===c||c.call(t,n)),Object(d["s"])(t.chartData,t.openDomGoto)}),u.value.interaction("active-region"),u.value}Object(c["onMounted"])(()=>{b(),Object(d["i"])(n.value,u.value)});let O={};Object(c["watch"])(()=>t.chartData,e=>{var a;e&&u.value&&Object(h["dc"])(e)&&(t.chartCfg&&t.chartCfg.width&&t.chartCfg.height&&(null===(a=u.value)||void 0===a||a.changeSize(+t.chartCfg.width,t.chartCfg.height)),Object(d["u"])(e,O)?(O=Object(o["U"])(e),v(u.value,e,t.chartDataResult,"chartData")):O=Object(o["U"])(e))},{immediate:!0,deep:!0}),Object(d["C"])(t,u);let j={};function f(e,a){j=Object(o["U"])(a),u.value||b(),v(u.value,e,t.chartDataResult,"dataList")}Object(c["watch"])(()=>t.chartDataResult.data,()=>{Object(h["Kc"])(j,t.chartDataResult)||(n.value?f(t.chartData,t.chartDataResult):Object(c["onMounted"])(()=>{f(t.chartData,t.chartDataResult)}))},{immediate:!0}),Object(c["watch"])(()=>t.config,()=>{v(u.value,t.chartData,t.chartDataResult,"config")},{deep:!0});const g=Object(h["O"])();function v(e,a,c,i=""){var o;Object(d["v"])(a)&&Object(h["Kc"])(a,c.chartData)&&(e.destroy(),e=b(),null===(o=t.setChartInstance)||void 0===o||o.call(t,e),p(e,a),Object(h["p"])(e,t.config,a,c.data,Object(d["t"])(a,O)?g:void 0,r),t.chartCfg&&t.chartCfg.width&&t.chartCfg.height&&(null===e||void 0===e||e.changeSize(t.chartCfg.width,t.chartCfg.height)),e.render(),Object(h["tc"])(a)&&Object(d["i"])(n.value,e))}function p(e,c){e||(e=b());const{scales:n,dimensions:i}=Object(h["Kb"])(c);if(n.length){const t=Object(h["V"])(c);e.scale(t)}if(i.length&&n.length){const r=Object(h["Ec"])(c),o=i[0].chartField.displayName,l=n[0].chartField.displayName,d={fields:[o,l]};r&&(d.fields=[o,s["j"]]),a=e.interval({maxColumnWidth:30}).position(d),r&&a.color(s["i"]).adjust([{type:"dodge",marginRatio:0}]),Object(h["r"])(e,t.config,c,a)}Object(h["s"])(e,t.config,c),Object(h["q"])(e,t.config,c,t.chartDataResult.guidesData),Object(h["n"])(e,t.config,c,i&&i.length&&i[0].chartField||void 0,n&&n.length&&n[0].chartField||void 0),e.tooltip({showMarkers:!1,shared:!0,showNil:!0,showTitle:!0,customItems:t=>Object(h["Eb"])(t,c)}),Object(h["cc"])(c)?e.coordinate().transpose():Object(h["nd"])(e),Object(h["qd"])(e,c,t.config)}return Object(d["E"])(t,u,p),Object(d["D"])(t,u),Object(d["z"])(t,u,r),Object(c["onBeforeUnmount"])(()=>{u.value.off(),u.value.destroy(),u.value=void 0,Object(h["K"])(r)}),{designerChartViewRef:n,designerChartViewInnerRef:i,chart:u}}}),b=a("6b0d"),O=a.n(b);const j=O()(u,[["render",r]]);e["default"]=j}}]);