有人知道如何在量表上添加一个值吗?我正在使用justgage.js
目前我有这样的情况:
我想要实现的是这样的东西?
我的代码是这样的:
document.addEventListener("DOMContentLoaded", function (event) {
var jg1;
var defs1 = {
label: "Average",
value: 2.5,
min: 0,
max: 5,
valueText: 2,
labelMinFontSize: 9,
gaugeColor: "#edebeb",
decimals: 0.0,
gaugeWidthScale: 0.8,
pointer: true,
formatNumber: true,
startAnimationTime: 2000,
levelColors: ["#0066cc", "#0066cc", "#0066cc"],
pointerOptions: {
toplength: -15,
bottomlength: 10,
bottomwidth: 12,
color: '#8e8e93',
stroke: '#ffffff',
stroke_width: 3,
stroke_linecap: 'round'
},
counter: true,
relativeGaugeSize: true
}
jg1 = new JustGage({
id: "jg1",
defaults: defs1
});
});