dashboard: inherit text color from the Chart defaults for the inline gauge plugin (https://github.com/opnsense/core/issues/7488)

This commit is contained in:
Stephan de Wit 2024-05-27 16:12:58 +02:00
parent eac8af8e7f
commit b74baecf13

View File

@ -115,6 +115,7 @@ export default class BaseGaugeWidget extends BaseWidget {
let fontSize = (height / divisor).toFixed(2);
ctx.font = fontSize + "em SourceSansProSemiBold";
ctx.textBaseline = "middle";
ctx.fillStyle = Chart.defaults.color;
let textX = Math.round((width - ctx.measureText(primaryText).width) / 2);
let textY = (height * 0.66);