Update gauge colors: green for positive scores, red for negative scores

This commit is contained in:
Harwinder Sekhon
2026-08-15 11:38:25 -04:00
parent a0df63b1d9
commit 4861cd9771
+6 -4
View File
@@ -22,11 +22,9 @@ document.addEventListener('DOMContentLoaded', function() {
width: 200, width: 200,
height: 160, height: 160,
redFrom: -100, redFrom: -100,
redTo: -50, redTo: 0,
yellowFrom: -50,
yellowTo: 0,
greenFrom: 0, greenFrom: 0,
greenTo: 50, greenTo: 100,
minorTicks: 5, minorTicks: 5,
min: -100, min: -100,
max: 100, max: 100,
@@ -37,6 +35,10 @@ document.addEventListener('DOMContentLoaded', function() {
} }
}; };
// Remove yellow region
delete options.yellowFrom;
delete options.yellowTo;
// Create and draw the gauge // Create and draw the gauge
const chart = new google.visualization.Gauge(container); const chart = new google.visualization.Gauge(container);
chart.draw(data, options); chart.draw(data, options);