Platform
Resources
Pricing
Sign in
Get started
Emmanuel Iarussi
Computer Graphics
Workspace
Fork
Public
DataViz2025_MiM
By
Emmanuel Iarussi
Edited
Sep 18, 2021
Fork of
2.3 Márgenes y escalas
•
4 forks
DataViz2025_MiM
1.0 ¿Qué es Observable?
1.1 Programando con Observable
1.2 Introducción a HTML
1.3 Primeros pasos en D3
1.4 Selecciones en D3
Actividad 1: Introducción a Observable y D3
2.0 Importando datos en Observable I
2.1 Importando datos en Observable II
2.2 Escalas y ejes
2.3 Márgenes y escalas
2.4 Barras desde cero en D3
Actividad 2: Importación de datos y escalas - 1ra parte
Actividad 2: Importación de datos y escalas - 2da parte
3.0 Interactividad: Eventos del mouse I
3.1 Interactividad: Eventos del mouse II
3.2 Tooltips
3.3 Brushing
3.4 Animaciones
Actividad 3: Interactividad
Insert cell
Insert cell
Insert cell
Insert cell
margin
=
(
{
top
:
20
,
right
:
30
,
bottom
:
30
,
left
:
40
}
)
// Cambiá estos valores para ver el efecto
Insert cell
Insert cell
// width = 954 // (Opcional, si no está definida se considera que vale lo mismo que el ancho de la celda)
Insert cell
height
=
500
// Alto
Insert cell
Insert cell
x
=
d3
.
scaleLinear
(
)
.
domain
(
[
0
,
1
]
)
.
range
(
[
margin
.
left
,
width
-
margin
.
right
]
)
// x va de (margen izquierdo) -> (ancho - margen derecho)
Insert cell
y
=
d3
.
scaleLinear
(
)
.
domain
(
[
0
,
1
]
)
.
range
(
[
height
-
margin
.
bottom
,
margin
.
top
]
)
// y va de (altura - margen inferior) -> (margen superior)
Insert cell
Insert cell
xAxis
=
g
=>
g
.
attr
(
"transform"
,
`translate(0,${
height
-
margin
.
bottom
})`
)
.
call
(
d3
.
axisBottom
(
x
)
)
Insert cell
Insert cell
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Compare fork
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
graphic
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
margin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
height
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
x
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
y
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
xAxis
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
yAxis
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
d3
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML