Published
Edited
Jun 7, 2021
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
width = 1000
Insert cell
height = width * 0.354
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function drawBaziserLine(start, end) {
const x1 = start.x + start.width
const y1 = start.y + start.height / 2
const x2 = end.x
const y2 = end.y + end.height / 2
// const halfX = (x1 + x2) / 2
// const halfY = (y1 + y2) / 2
const diffX = Math.abs(x2 - x1) / 3
// const diffY = Math.abs(y2 - y1) / 4
return `<path d="M${x1} ${y1} C ${x1 + diffX} ${y1}, ${x2 - diffX} ${y2}, ${x2} ${y2}" stroke="#C0CAD2" fill="transparent"/>`
// return `<path d="M100 100 c 20 20, 40 20, 50 10" stroke="black" fill="transparent"/>`
}
Insert cell
function drawReverseLine(start, end) {
const x2 = end.x
const y2 = end.y + end.height / 2
const x1 = start.x + start.width
const y1 = y2
return `<path d="M${x1} ${y1}, L${x2} ${y2}" stroke="#C0CAD2" fill="transparent"/>`
}
Insert cell
Insert cell
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more