Published
Edited
Mar 11, 2021
Importers
Insert cell
Insert cell
Insert cell
{
const svg = d3
.create("svg")
.attr("width", width)
.attr("height", 600);

svg.append("g").call(chart, {
height: 300,
width: width / 2,
points: [[0, 0], [2, 2], [3, 1]]
});

svg
.append("g")
.call(chart, {
height: 300,
width: width / 2,
points: [[0, 0], [1, 1], [2, 1]]
})
.attr("transform", 'translate(0, 300)');

svg
.append("g")
.call(chart, {
height: 300,
width: width / 2,
points: [[0, 0], [2, 1], [5, 3]]
})
.attr("transform", `translate(${width / 2}, 0)`);

svg
.append("g")
.call(chart, {
height: 300,
width: width / 2,
points: [[0, 0], [1, 1], [10, -1]]
})
.attr("transform", `translate(${width / 2}, 300)`);

return svg.node();
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
const svg = d3
.create("svg")
.attr("width", width)
.attr("height", 200);

svg.call(chart, {
height: 200,
points: [[0, 0], [1, 1], [2, 1]]
});

return svg.node();
}
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.
Learn more