Closed PaoloVi closed 2 years ago
Gauge instance has setMaxValue
;)
Hi @PaoloVIP You can set the max value dynamically and two things will happen:
Hence it'd be a good idea to show the current and max value both as part of the label using the label
function
var max = getMaxFromSomewhere();
var gauge7 = Gauge(
document.getElementById("gauge7"), {
max: max,
dialStartAngle: -90,
dialEndAngle: -90.001,
value: 100,
showValue: true,
label: function(value) {
return `${Math.round(value * 100) / 100} / ${max}`;
}
}
);
Can be setMaxValue dynamic like setValueAnimated or setValue ?