Platform
Resources
Pricing
Sign in
Get started
Fritz Lekschas
👋 I am computer scientist researching intelligent and scalable visualization systems for biomedical data exploration. Harvard CS PhD '21.
Workspace
Fork
Published
By
Fritz Lekschas
Edited
Sep 11, 2021
Fork of
Piling.js with D3
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
itemRenderer
=
pilingJs
.
createVegaLiteRenderer
(
{
vega
,
vegaLite
,
baseSpec
:
{
$schema
:
"https://vega.github.io/schema/vega-lite/v5.json"
,
width
:
itemWidth
,
height
:
itemHeight
,
mark
:
"bar"
,
encoding
:
{
x
:
{
field
:
"index"
,
type
:
"ordinal"
}
,
y
:
{
field
:
"value"
,
type
:
"quantitative"
}
}
}
}
)
Insert cell
Insert cell
Insert cell
viewSpec
=
(
{
// Mandatory
items
,
itemRenderer
,
// Optional
columns
:
10
,
pileBorderColor
:
0xdddddd
,
pileBorderSize
:
1
,
pileItemOffset
:
[
-
10
,
10
]
,
pileItemBrightness
:
(
item
,
i
,
pile
)
=>
Math
.
min
(
0.9
,
0.1
*
(
pile
.
items
.
length
-
1
-
i
)
)
}
)
Insert cell
Insert cell
piling
=
{
rerun
;
if
(
state
.
piling
)
state
.
piling
.
destroy
(
)
;
state
.
piling
=
pilingJs
.
createLibrary
(
container
,
viewSpec
)
;
yield
state
.
piling
;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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
container
Edit
Pin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
rerun
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
itemRenderer
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
viewSpec
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
piling
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
state
Edit
Pin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
x
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
y
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
items
Edit
Pin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
numItems
Edit
Pin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
numHistBins
Edit
Pin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
itemWidth
Edit
Pin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
itemHeight
Edit
Pin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
height
Edit
Pin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
width
Edit
Pin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
vega
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
vegaLite
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
PIXI
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
UMAP
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
pilingJs
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML