Files

1 line
1.3 KiB
JavaScript

import{rt as e,xt as t}from"./common.js";import{createBlock as n,defineComponent as r,mergeProps as i,nextTick as a,openBlock as o,toHandlers as s,unref as c,watch as l}from"vue";import"vue-data-ui/style.css";import{VueUiWheel as u}from"vue-data-ui/vue-ui-wheel";var d=r({name:`MfWheel`,__name:`index`,props:{chart:{type:Object,required:!0},chartContain:{type:Object,required:!0}},setup(r){let d=r,{commonEvents:f}=e(d.chart),p=t();l(()=>p.getTheme,e=>{d.chart&&a().then(()=>{m(d.chart,e)})},{immediate:!0});function m(e,t){let n={dark:`#3A3A3A`,light:`#E1E5E8`};if(!e.options.style.chart.layout.wheel.ticks.inactiveColor){e.options.style.chart.layout.wheel.ticks.inactiveColor=n[t];return}if(!e.options.style.chart.layout.innerCircle.stroke){e.options.style.chart.layout.innerCircle.stroke=n[t];return}(e.options.style.chart.layout.innerCircle.stroke===n.dark||e.options.style.chart.layout.innerCircle.stroke===n.light)&&(e.options.style.chart.layout.innerCircle.stroke=n[t]),(e.options.style.chart.layout.wheel.ticks.inactiveColor===n.dark||e.options.style.chart.layout.wheel.ticks.inactiveColor===n.light)&&(e.options.style.chart.layout.wheel.ticks.inactiveColor=n[t])}return(e,t)=>(o(),n(c(u),i({dataset:r.chart.data?.dataSet||{percentage:0},config:r.chart.options},s(c(f))),null,16,[`dataset`,`config`]))}});export{d as default};