From 309c296670add9501fa9690238d39afd2c65aec8 Mon Sep 17 00:00:00 2001 From: ferngon <fernando.gonzalez.sanz@alumnos.uva.es> Date: Wed, 4 Dec 2024 11:13:06 +0000 Subject: [PATCH] Update file xg2.js --- xg2.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xg2.js b/xg2.js index 566dd67..71af154 100644 --- a/xg2.js +++ b/xg2.js @@ -165,10 +165,10 @@ .attr("width", d => Math.abs(x(d.xG_diff) - x(0))) // Longitud proporcional a xG_diff .attr("height", y.bandwidth()) .attr("fill", d => { - const intensity = Math.min(1, Math.abs(d.xG_diff) / 10); // Escala de intensidad ajustable + const intensity = Math.min(0.2, Math.abs(d.xG_diff) / 10); // Escala de intensidad ajustable return d.xG_diff > 0 - ? d3.interpolateBlues(intensity*10) // Azul para valores positivos - : d3.interpolateReds(intensity*10); // Rojo para valores negativos + ? d3.interpolateBlues(intensity) // Azul para valores positivos + : d3.interpolateReds(intensity); // Rojo para valores negativos }) .on("click", function(event, d) { infoContainer2 -- GitLab