import{t as e}from"./vue.runtime.esm-BkFIT5TI.js";import{a as t,l as n,n as r,r as i,s as a,t as o}from"./_plugin-vue2_normalizer-agX0mVFg.js";import{t as s}from"./merge-BTvhZMGP.js";var c=class extends e{data;dimensions;options;height;chart;ready=!1;onData(e){this.chart&&e&&e.length&&this.chart.setOption({dataset:{dimensions:this.dimensions,source:e}})}get opts(){return s({grid:{top:0,left:0,right:0,bottom:0}},this.options)}mounted(){this.data&&!this.ready&&(this.ready=!0)}beforeDestroy(){typeof window>`u`||this.chart&&this.chart.dispose()}};r([a({type:Array,required:!0})],c.prototype,`data`,void 0),r([a({type:Array})],c.prototype,`dimensions`,void 0),r([a({type:Object,default:()=>{}})],c.prototype,`options`,void 0),r([a({type:String,default:`100%`})],c.prototype,`height`,void 0),r([t(`chart`)],c.prototype,`chart`,void 0),r([i(`data`)],c.prototype,`onData`,null),c=r([n({})],c);var l=o(c,function(){var e=this,t=e._self._c;return e._self._setupProxy,t(`div`,[t(`div`,{staticClass:`chart`,style:{height:e.height}},[e.ready?t(`e-chart`,{ref:`chart`,staticStyle:{overflow:`initial`},attrs:{option:e.opts,"update-options":{notMerge:!0},"init-options":{renderer:`svg`},autoresize:``}}):e._e()],1)])},[],!1,null,`b446f24d`,null,null).exports;export{l as t};