Refer to the following code snippet demonstrating how to change a label's font. A custom font color is ignored if a red label is always shown.
JavaScriptfunction UpdateItems(s, e) {
if (e.ItemName.indexOf('gauge') >= 0) {
var gauges = e.GetWidget();
$.each(gauges, function (_, gauge) {
gauge.option('indicator.text.value', 'Test');
gauge.option('indicator.text.font', {
family: 'Zapf-Chancery, cursive',
weight: 400,
color: 'forestgreen',
size: 22
});
});
}
}