Update gauge colors: green for positive scores, red for negative scores
This commit is contained in:
+6
-4
@@ -22,11 +22,9 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
width: 200,
|
||||
height: 160,
|
||||
redFrom: -100,
|
||||
redTo: -50,
|
||||
yellowFrom: -50,
|
||||
yellowTo: 0,
|
||||
redTo: 0,
|
||||
greenFrom: 0,
|
||||
greenTo: 50,
|
||||
greenTo: 100,
|
||||
minorTicks: 5,
|
||||
min: -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
|
||||
const chart = new google.visualization.Gauge(container);
|
||||
chart.draw(data, options);
|
||||
|
||||
Reference in New Issue
Block a user