CloudGamingAdmin/admin-client/dist/static/js/BarChartTransverse-LTfEjf6V.js
2024-11-15 02:58:48 +08:00

2 lines
1.1 KiB
JavaScript

import{C as l}from"./index-CN67pQjh.js";import{d as o,r as s,l as r,e as d,n as h,c as u,o as f}from"./index-D2_T1wn8.js";import"./conjugateGradient-Bo7LGy1w.js";import"./index-DtwzQIQG.js";const p=["id"],_=o({__name:"BarChartTransverse",props:{id:{default:new Date().getTime()+"_"+Math.floor(Math.random()*1e3)},data:{},height:{default:500},valueAlias:{}},setup(n){const e=n,t=s({id:r(()=>e.id),chartObject:null,data:r(()=>e.data)}),i=()=>{t.chartObject=new l({container:t.id,autoFit:!0,height:e.height}),t.chartObject.scale({value:{min:0,alias:e.valueAlias}}),t.chartObject.axis("type",{title:null,tickLine:null,line:null}),t.chartObject.axis("value",{label:null,title:{offset:30,style:{fontSize:12,fontWeight:300}}}),t.chartObject.legend(!1),t.chartObject.coordinate().transpose(),t.chartObject.interval().position("type*value").size(26).label("value",{style:{fill:"#8d8d8d"},offset:10}),t.chartObject.interaction("element-active")},c=a=>{t.chartObject&&(t.chartObject.annotation().clear(!0),t.chartObject.data(a),t.chartObject.render())};return d(()=>{i(),c(t.data)}),h(t.data,a=>{c(a)}),(a,b)=>(f(),u("div",{id:t.id},null,8,p))}});export{_ as default};