import{o as e,t}from"./vue.runtime.esm-BGP6PPFT.js";import{a as n,l as r,n as i,r as a,s as o,t as s}from"./_plugin-vue2_normalizer-Vm4EDAeQ.js";import{t as c}from"./merge-ELi9qA8K.js";e();var l=class extends t{data;dimensions;options;height;chart;updateOptions=Object.freeze({notMerge:!0});initOptions=Object.freeze({renderer:`canvas`});ready=!1;onData(e){this.chart&&e&&e.length&&this.chart.setOption({dataset:{dimensions:this.dimensions,source:e}})}get opts(){return c({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()}};i([o({type:Array,required:!0})],l.prototype,`data`,void 0),i([o({type:Array})],l.prototype,`dimensions`,void 0),i([o({type:Object,default:()=>{}})],l.prototype,`options`,void 0),i([o({type:String,default:`100%`})],l.prototype,`height`,void 0),i([n(`chart`)],l.prototype,`chart`,void 0),i([a(`data`)],l.prototype,`onData`,null),l=i([r({})],l);var u=s(l,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":e.updateOptions,"init-options":e.initOptions,autoresize:``}}):e._e()],1)])},[],!1,null,`a217dd78`,null,null).exports;export{u as t};