Public
Edited
Oct 16, 2023
Insert cell
Insert cell
data = [
{ item: "Design", type: "a", score: 70 },
{ item: "Development", type: "a", score: 60 },
{ item: "Marketing", type: "a", score: 50 },
{ item: "Users", type: "a", score: 40 }
]
Insert cell
g2({
type: "line",
data: data,
width: 500,
height: 500,
encode: { x: "item", y: "score" },
axis: {
y: { labelOpacity: "0", titleOpacity: "0" },
x: { gridConnect: "line" }
},
coordinate: { type: "polar", startAngle: -Math.PI, endAngle: Math.PI },
scale: { y: { domainMin: 0, domainMax: 80 } },
style: { strokeWidth: 10, lineJoin: "round" },
tooltip: false
})
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