Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EvolucionPIB
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DESI_24-25
EvolucionPIB
Commits
1ce01909
Commit
1ce01909
authored
4 months ago
by
frajuar
Browse files
Options
Downloads
Patches
Plain Diff
Titulos actualizados y fuente arreglada
parent
62845f56
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Js/script.js
+9
-1
9 additions, 1 deletion
Js/script.js
css/estilo.css
+10
-1
10 additions, 1 deletion
css/estilo.css
index.html
+3
-0
3 additions, 0 deletions
index.html
with
22 additions
and
2 deletions
Js/script.js
+
9
−
1
View file @
1ce01909
...
...
@@ -178,7 +178,8 @@ function dibujaMapa(seleccionAnno) {
.
selectAll
(
"
text
"
)
.
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;
for
(
let
i
=
Math
.
log
(
min
);
i
<=
Math
.
log
(
max
);
i
+=
0.1
)
{
legend
.
append
(
"
rect
"
)
.
attr
(
"
x
"
,
0
)
...
...
@@ -187,6 +188,13 @@ function dibujaMapa(seleccionAnno) {
.
attr
(
"
height
"
,
legendScale
(
Math
.
exp
(
i
+
0.1
))
-
legendScale
(
Math
.
exp
(
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
"
);
});
}
...
...
This diff is collapsed.
Click to expand it.
css/estilo.css
+
10
−
1
View file @
1ce01909
/* General */
body
{
margin
:
0
;
height
:
100vh
;
/* Asegura que el cuerpo ocupe toda la altura */
display
:
flex
;
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 */
#map
{
flex
:
2
;
/* Ocupa el doble de espacio que #abajo */
...
...
@@ -37,4 +45,5 @@ body {
font-weight
:
bold
;
fill
:
#000000
;
pointer-events
:
none
;
font-family
:
Arial
,
sans-serif
;
}
This diff is collapsed.
Click to expand it.
index.html
+
3
−
0
View file @
1ce01909
...
...
@@ -7,6 +7,9 @@
<script
src=
"https://d3js.org/d3.v7.min.js"
></script>
</head>
<body>
<div
id=
"titulo"
>
Distribución del PIB mundial en cientos de millones de dólares
</div>
<div
id=
"map"
>
<!-- Add a container for the year selector -->
<div
id=
"yearSelectorContainer"
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment