Platform
Resources
Pricing
Sign in
Get started
Samuel Gratzl
Data Visualization Engineer - Research Scientist - author of @lineupjs
Workspace
Fork
Published
LineUp.js
By
Samuel Gratzl
Edited
Feb 21, 2020
1 fork
2 stars
Insert cell
md
`# LineUp Simple example with Observable base`
Insert cell
import
{
asLineUp
}
from
'@sgratzl/lineup-js-observable-library'
Insert cell
cats
=
[
'c1'
,
'c2'
,
'c3'
]
Insert cell
md
`## Create some random data to show`
Insert cell
data
=
{
const
arr
=
[
]
for
(
let
i
=
0
;
i
<
1000
;
++
i
)
{
arr
.
push
(
{
a
:
Math
.
random
(
)
*
10
,
d
:
'Row '
+
i
,
cat
:
cats
[
Math
.
floor
(
Math
.
random
(
)
*
3
)
]
,
cat2
:
cats
[
Math
.
floor
(
Math
.
random
(
)
*
3
)
]
}
)
}
return
arr
;
}
Insert cell
2
viewof
selection
=
asLineUp
(
data
)
Insert cell
selection
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
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
cats
Unpin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
data
Unpin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
selection
Show 2 comments
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
JavaScript
Markdown
HTML
JavaScript
Markdown
HTML