From 851ce06837efdb286c4fe801a1949ecc0f694c93 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 26 Dec 2022 12:15:28 +0100 Subject: [PATCH] Align the sparkline a bit better. --- www/js/remoteglot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index 0aa071a..b0c89cb 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -1427,16 +1427,16 @@ let update_sparkline = function(data) { let color; if (scores[i] === 0) { color = [0.5, 0.5, 0.5]; - rect.setAttributeNS(null, 'y', base_y - 1); + rect.setAttributeNS(null, 'y', base_y); rect.setAttributeNS(null, 'height', 1); } else if (scores[i] > 0) { color = [0.2, 0.4, 0.8]; rect.setAttributeNS(null, 'y', base_y - extent); - rect.setAttributeNS(null, 'height', extent); + rect.setAttributeNS(null, 'height', extent + 1); } else { color = [1.0, 0.267, 0.267]; rect.setAttributeNS(null, 'y', base_y); - rect.setAttributeNS(null, 'height', -extent); + rect.setAttributeNS(null, 'height', -extent + 1); } let hlcolor = [color[0], color[1], color[2]]; if (scores[i] !== 0) { -- 2.39.2