Skip to content
Snippets Groups Projects
Commit d5b74016 authored by ferngon's avatar ferngon
Browse files

Update file xg2.js

parent 2784a0ef
No related branches found
No related tags found
No related merge requests found
Pipeline #12810 passed
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
.style("top", 160 + "px") .style("top", 160 + "px")
.style("left", (width + margin.left + margin.right + 160) + "px") .style("left", (width + margin.left + margin.right + 160) + "px")
.style("width", "260px") .style("width", "260px")
.style("height", "390px") .style("height", "400px")
.style("border", "4px solid black") .style("border", "4px solid black")
.style("padding", "10px") .style("padding", "10px")
.style("background-color", "#f9f9f9") .style("background-color", "#f9f9f9")
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
.attr("width", d => Math.abs(x(d.xG_diff) - x(0))) // Longitud proporcional a xG_diff .attr("width", d => Math.abs(x(d.xG_diff) - x(0))) // Longitud proporcional a xG_diff
.attr("height", y.bandwidth()) .attr("height", y.bandwidth())
.attr("fill", d => { .attr("fill", d => {
const intensity = Math.min(10, Math.abs(d.xG_diff) / 10); // Escala de intensidad ajustable const intensity = Math.min(100, Math.abs(d.xG_diff) / 10); // Escala de intensidad ajustable
return d.xG_diff > 0 return d.xG_diff > 0
? d3.interpolateBlues(intensity) // Azul para valores positivos ? d3.interpolateBlues(intensity) // Azul para valores positivos
: d3.interpolateReds(intensity); // Rojo para valores negativos : d3.interpolateReds(intensity); // Rojo para valores negativos
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment