"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("vue"),c=require("lodash"),v=require("../../commons/core/datasource/index.js"),_=require("../../commons/utils/parseOtherData.js"),b=require("../../commons/core/useChart.js"),f={class:"zerov-widget"},O=["id"],D=s.defineComponent({name:"zv-chart-other-parallel-mul"}),E=s.defineComponent({...D,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,p=d,{id:h,setOption:o,chart:m,renderChart:n,renderData:a}=b.useChart({basicOption:c.cloneDeep(e.basicOption),useEvents:c.cloneDeep(e.useEvents),customRenderData:t=>{t=c.cloneDeep(t),v.SHJDatasourceV2.parse({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(_.parseOtherData(c.cloneDeep(r),t))}catch{window.SHJParseEvent(e.useEvents,"dataListener",null),o(t)}}})},emit:p});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",f,[s.createElementVNode("div",{id:s.unref(h),class:"widget"},null,8,O)]))}});exports.default=E;
