Skip to content
Snippets Groups Projects
Commit 1ce01909 authored by frajuar's avatar frajuar
Browse files

Titulos actualizados y fuente arreglada

parent 62845f56
No related branches found
No related tags found
No related merge requests found
...@@ -179,6 +179,7 @@ function dibujaMapa(seleccionAnno) { ...@@ -179,6 +179,7 @@ function dibujaMapa(seleccionAnno) {
.attr("transform", "translate(30, 0)") // Desplazar los valores de la leyenda a la derecha .attr("transform", "translate(30, 0)") // Desplazar los valores de la leyenda a la derecha
.style("text-anchor", "start"); // Alinear los valores de la leyenda a la derecha; .style("text-anchor", "start"); // Alinear los valores de la leyenda a la derecha;
for (let i = Math.log(min); i <= Math.log(max); i += 0.1) { for (let i = Math.log(min); i <= Math.log(max); i += 0.1) {
legend.append("rect") legend.append("rect")
.attr("x", 0) .attr("x", 0)
...@@ -187,6 +188,13 @@ function dibujaMapa(seleccionAnno) { ...@@ -187,6 +188,13 @@ function dibujaMapa(seleccionAnno) {
.attr("height", legendScale(Math.exp(i + 0.1)) - legendScale(Math.exp(i))) .attr("height", legendScale(Math.exp(i + 0.1)) - legendScale(Math.exp(i)))
.style("fill", legendBar(i)); .style("fill", legendBar(i));
} }
legend.append("text")
.raise()
.attr("x", 0)
.attr("y", -10 + legendScale(Math.exp(i + 0.1)) - legendScale(Math.exp(i)))
.style("font-size", "12px")
.style("font-weight", "bold")
.text("PIB");
}); });
} }
... ...
......
/* General */
body { body {
margin: 0; margin: 0;
height: 100vh; /* Asegura que el cuerpo ocupe toda la altura */ height: 100vh; /* Asegura que el cuerpo ocupe toda la altura */
display: flex; display: flex;
flex-direction: column; /* Disposición vertical */ flex-direction: column; /* Disposición vertical */
} }
#titulo{
background-color: rgb(207, 207, 207);
font-weight: bold;
padding-top: 5px;
font-family: Arial, sans-serif;
text-align: center;
font-size: large;
}
/* Contenedor del mapa */ /* Contenedor del mapa */
#map { #map {
flex: 2; /* Ocupa el doble de espacio que #abajo */ flex: 2; /* Ocupa el doble de espacio que #abajo */
...@@ -37,4 +45,5 @@ body { ...@@ -37,4 +45,5 @@ body {
font-weight: bold; font-weight: bold;
fill: #000000; fill: #000000;
pointer-events: none; pointer-events: none;
font-family: Arial, sans-serif;
} }
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
<script src="https://d3js.org/d3.v7.min.js"></script> <script src="https://d3js.org/d3.v7.min.js"></script>
</head> </head>
<body> <body>
<div id="titulo">
Distribución del PIB mundial en cientos de millones de dólares
</div>
<div id="map"> <div id="map">
<!-- Add a container for the year selector --> <!-- Add a container for the year selector -->
<div id="yearSelectorContainer"> <div id="yearSelectorContainer">
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment