import{o as e,t}from"./vue.runtime.esm-BuK-KA7b.js";import{i as n,n as r,o as i,t as a}from"./_plugin-vue2_normalizer-D5mCHcOy.js";import{n as o,t as s}from"./Watch-CG2UWV2X.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()}};r([n({type:Array,required:!0})],c.prototype,`data`,void 0),r([n({type:Array})],c.prototype,`dimensions`,void 0),r([n({type:Object,default:()=>{}})],c.prototype,`options`,void 0),r([n({type:String,default:`100%`})],c.prototype,`height`,void 0),r([o(`chart`)],c.prototype,`chart`,void 0),r([s(`options`)],c.prototype,`onOptions`,null),r([s(`data`)],c.prototype,`onData`,null),c=r([i({})],c);var l=a(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};