diff --git a/xg2.js b/xg2.js index cfe285be9cf9fff0e5c035de4bae07e53120cdf6..e25cdda1e360ea6737fcba654eeea9c557106bee 100644 --- a/xg2.js +++ b/xg2.js @@ -42,7 +42,7 @@ .style("top", 160 + "px") .style("left", (width + margin.left + margin.right + 160) + "px") .style("width", "260px") - .style("height", "400px") + .style("height", "410px") .style("border", "4px solid black") .style("padding", "10px") .style("background-color", "#f9f9f9") @@ -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(100, Math.abs(d.xG_diff) / 10); // Escala de intensidad ajustable + const intensity = Math.min(1, Math.abs(d.xG_diff) / 10); // Escala de intensidad ajustable return d.xG_diff > 0 - ? d3.interpolateBlues(intensity) // Azul para valores positivos - : d3.interpolateReds(intensity); // Rojo para valores negativos + ? d3.interpolateBlues(intensity*1.5) // Azul para valores positivos + : d3.interpolateReds(intensity*1.5); // Rojo para valores negativos }) .on("click", function(event, d) { infoContainer2