"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("vue"),c=require("lodash"),v=require("../../utils/parseOtherData.js"),_=require("../../core/useChart.js"),b={class:"zerov-widget"},f=["id"],O=s.defineComponent({name:"zv-chart-other-parallel-mul"}),w=s.defineComponent({...O,props:{basicOption:{},sources:{},useEvents:{},uuid:{}},emits:["chart-click","chart-dblclick","chart-mousedown","chart-mouseover","chart-mouseout","chart-contextmenu"],setup(u,{expose:l,emit:d}){const e=u,h=d,{id:p,setOption:o,chart:m,renderChart:n,renderData:a}=_.useChart({basicOption:c.cloneDeep(e.basicOption),useEvents:c.cloneDeep(e.useEvents),customRenderData:t=>{t=c.cloneDeep(t),window.SHJDatasourceV2({tId:e.uuid,sources:e.sources,callback:({data:r})=>{try{window.SHJParseEvent(e.useEvents,"dataListener",r),t.legend.data=r.map(i=>i.key),o(v.parseOtherData(c.cloneDeep(r),t))}catch{window.SHJParseEvent(e.useEvents,"dataListener",null),o(t)}}})},emit:h});return s.watch(()=>e.sources,()=>{a(e.basicOption)},{deep:!0}),s.watch(()=>c.cloneDeep(e.basicOption),(t,r)=>{c.isEqual(t,r)||n(t)},{deep:!0}),l({getEchartsInstance:()=>m.value,refresh:()=>{e.sources&&e.sources.length>0&&n(e.basicOption),a(e.basicOption)},refreshView:()=>{e.sources&&e.sources.length>0&&n(e.basicOption)},refreshData:()=>{a(e.basicOption)}}),(t,r)=>(s.openBlock(),s.createElementBlock("div",b,[s.createElementVNode("div",{id:s.unref(p),class:"widget"},null,8,f)]))}});exports.default=w;
