Public
Edited
Jan 16, 2024
Insert cell
Insert cell
Insert cell
Insert cell
visualise = async container => {
const visualiser = await new ECharts.Visualiser(container, options).build();
container.replaceChildren(visualiser.element);
return visualiser;
}
Insert cell
Insert cell
data = [
{ name: 'a' },
{ name: 'b' },
{ name: 'a1' },
{ name: 'a2' },
{ name: 'b1' },
{ name: 'c' }
]
Insert cell
Insert cell
options = ({
series: {
type: 'sankey',
layout: 'none',
emphasis: { focus: 'adjacency' },
data,
links: [
{ source: 'a', target: 'a1', value: 5 },
{ source: 'a', target: 'a2', value: 3 },
{ source: 'b', target: 'b1', value: 8 },
{ source: 'a', target: 'b1', value: 3 },
{ source: 'b1', target: 'a1', value: 1 },
{ source: 'b1', target: 'c', value: 2 }
]
}
})
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