Public
Edited
Dec 28, 2023
3 forks
7 stars
Insert cell
Insert cell
img3D = {
let div = d3.create("div").style("width", "800px").style("height", "600px");
let chart = echarts.init(div.node());
chart.setOption(option);
return div.node();
}
Insert cell
option = {
let symbolSize = 2.5;
return {
grid3D: {},
xAxis3D: {
type: "category"
},
yAxis3D: {},
zAxis3D: {},
dataset: {
dimensions: [
"Income",
"Life Expectancy",
"Population",
"Country",
{ name: "Year", type: "ordinal" }
],
source: data
},
series: [
{
type: "scatter3D",
symbolSize: symbolSize,
encode: {
x: "Country",
y: "Life Expectancy",
z: "Income",
tooltip: [0, 1, 2, 3, 4]
}
}
]
};
}
Insert cell
data = FileAttachment("life-expectancy-table.csv").csv()
Insert cell
echarts = require("echarts", "echarts-gl")
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