Platform
Resources
Pricing
Sign in
Get started
Sundar Singh
playing with space, shape, colour & composition
Workspace
Fork
Public
hello world
By
Sundar Singh
Edited
Feb 23, 2024
1 fork
10 stars
Insert cell
Insert cell
Insert cell
Insert cell
render
=
{
const
sel
=
d3
.
create
(
'div'
)
.
style
(
'width'
,
width
)
.
attr
(
'class'
,
'flex flex-wrap'
)
d3
.
range
(
avatars
)
.
forEach
(
n
=>
{
sel
.
append
(
'div'
)
.
append
(
'img'
)
.
attr
(
'src'
,
image
(
n
)
)
}
)
return
sel
.
node
(
)
}
Insert cell
2
Insert cell
Insert cell
image
=
(
n
)
=>
{
return
`https://api.dicebear.com/7.x/${
style
}/svg?seed=${
n
}`
}
Insert cell
// full list: https://avatars.dicebear.com/styles
typesAvatar
=
[
'pixel-art'
,
'open-peeps'
,
'bottts'
,
'avataaars'
,
'croodles'
,
'personas'
]
Insert cell
<
link
href
=
"https://unpkg.com/basscss@8.0.2/css/basscss.min.css"
rel
=
"stylesheet"
>
<
style
>
img
{
width
:
150
px
}
</
style
>
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
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
avatars
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
style
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
render
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Show 2 comments
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
image
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
typesAvatar
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML