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";e();var c=class extends t{data;dimensions;options;height;chart;initOptions=Object.freeze({renderer:`canvas`});applyOption(){if(!this.chart)return;let e={...this.options,grid:{top:0,left:0,right:0,bottom:0,...this.options.grid},dataset:{dimensions:this.dimensions,source:this.data}};this.chart.setOption(e,{notMerge:!0})}onOptions(){this.applyOption()}onData(e){this.chart!=null&&Array.isArray(e)&&this.chart.setOption({dataset:{dimensions:this.dimensions,source:e}})}beforeDestroy(){typeof window>`u`||this.chart?.dispose()}};i([o({type:Array,required:!0})],c.prototype,`data`,void 0),i([o({type:Array})],c.prototype,`dimensions`,void 0),i([o({type:Object,default:()=>{}})],c.prototype,`options`,void 0),i([o({type:String,default:`100%`})],c.prototype,`height`,void 0),i([n(`chart`)],c.prototype,`chart`,void 0),i([a(`options`)],c.prototype,`onOptions`,null),i([a(`data`)],c.prototype,`onData`,null),c=i([r({})],c);var l=s(c,function(){var e=this,t=e._self._c;return e._self._setupProxy,t(`div`,{staticClass:`chart`,style:{height:e.$filters.getPixelsString(e.height)}},[t(`e-chart`,{ref:`chart`,staticStyle:{overflow:`initial`},attrs:{"manual-update":``,"init-options":e.initOptions,autoresize:``},on:{"hook:mounted":e.applyOption}})],1)},[],!1,null,`5cbc2d21`,null,null).exports;export{l as t};