Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
type: 'mean',
text: {
position: 'start',
content: '平均值',
style: {
stroke: 'white',
lineWidth: 2,
},
},
},
],
});
tinyArea.render();
//ring-progress
const progressContainer = $(`#progress-${d.id}`);
const progress = new Progress(progressContainer, {
width: 200,
height: 50,
percent: d.load,
color: (v) => {
if (v < 0.3) {
return ['#30BF78', '#E8EDF3'];
} else if (v >= 0.3 && v < 0.7) {
return ['#FAAD14', '#E8EDF3'];
}
return ['#F4664A', '#E8EDF3'];
},
});
progress.render();
});