一般搜到这个问题我猜你应该是想只留仪表盘的指针和数字,然后放个切图的背景刻度,更换切图指针吧。下面上实例:需要注意的是icon处可更换指针,使用图片地址或base64时前面要加上image://哦。
option = {
series: [{
type: 'gauge',
startAngle: 193,
endAngle: -11,
min: 0,
max: 10,
splitNumber: 5,
progress: {
show: false,
},
pointer: {
icon:
'image://data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAByCAYAAAHL4ariAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3FpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpjMmEwZjU0Ny02MDZhLTA2NDctOWQ4Mi02ODQ3ODkzODNkNzIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzQ2MUJBQTJGQTRDMTFFQjgwM0RCQUNCRkRDQ0NDN0UiIHhtcE1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l4/3PVJljb7IlIKpohoXHX2kimwGROQ4lFWVG/OQlIrOKhTNUwGKijIuKMUAgY40SAFqv7EjRQwoMzoqWn2QzGTHBUUMKKDhI9N5jYgIkEyPDeowYMZhAGTx1I2WF4CQkCd2A5ouNiq0rAxVPlNezHO7PES1qrMoFYw9KVfL7RY0mS7qNANCml/MlFV8L2V9rco9tFx07rzG3/3guO2bv3PXrvcjDMBfwzer1dPnnjtybvPSyzAB4W6jtay++c5rFy9+cOUyflTjLwx69MrHX71Uayyc5P7ncefH77fOH196ld9878abc4dXL3B7dNz+ZvsNqE0vnG21+nuFyRWM5lOw1R5kha65Z6CogHl479edr1PZwsN7Bdpp/bHNz66eXFt75vVr3Bg30cYIs3/j6vPruPrzU41jU49tvPU+gGLpv+LZVm/n07cvnP3tu8/uYtBp7w6udOiJF1dqR85cFkBi7PE3sK0/f/7ywxe+vX7pC/Qnfp6ji0E1/zEC4sY/nDm60Zicf/xUMqMtg0SqimbNxHBgt2yr+4vZ2rl579ZHWz99fvUH73EDk3j0wPwHEWeAHetwYUMAAAAASUVORK5CYII=',
length: 114,
width: 21,
offsetCenter: [5, 10],
},
axisLine: {
show: false,
},
axisTick: {
show: false,
},
splitLine: {
show: false,
},
axisLabel: {
distance: 55,
color: '#fff',
fontSize: 26,
},
title: {
show: false,
},
detail: {
show: false,
},
data: [{
value: 5,
}],
}],
};
效果: