Published
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
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.
Learn more