import echarts from 'echarts'
import echartsLiquidfill from 'echarts-liquidfill'
import liquidfill from 'echarts-liquidfill'
export function full_health(element_id) {
var full_health = echarts.init(document.getElementById(element_id));
let option = {
backgroundColor: '#04184A',
series: [{
type: 'liquidFill',
//data: [0.6, 0.5, 0.4, 0.3],
data: [0.6, 0.5, 0.4, 0.3],
radius: '20%',
// 水球颜色
color: ['#49d088', '#38b470', '#2aaf66'],
center: ['25%', '50%'],
// outline 外边
outline: {
// show: false
borderDistance: 5,
itemStyle: {
borderWidth: 5,
borderColor: '#13FDCE',
},
},
label: {
normal: {
// textStyle: {
color: 'red',
insideColor: 'yellow',
fontSize: 100
// }
}
},
// 内图 背景色 边
backgroundStyle: {
color: 'rgba(4,24,74,0.8)',
// borderWidth: 5,
// borderColor: 'red',
}
}, ]
};
full_health.setOption(option);
}
在组件里面调用full_health方法
一直报这个错
npm install 了
json文件里面也有
组件里面也导入了
都不管用
求大神指点 水球图js应该怎么引入
问题描述
问题出现的环境背景及自己尝试过哪些方法
相关代码
// 请把代码文本粘贴到下方(请勿用图片代替代码)
你上面引用 为什么引用一个 却有两个名字
import echartsLiquidfill from 'echarts-liquidfill'
import liquidfill from 'echarts-liquidfill'