Plot.plot({
style: "overflow: visible;",
y: { grid: true },
marks: [
Plot.ruleY([0]),
Plot.lineY(data.records, {
x: "year",
y: "value",
z: (x) => x.indicatorId + x.geoUnit,
stroke: (x) => x.indicatorId,
title: (x) => `hello`
}),
Plot.text(
data.records,
Plot.selectLast({
x: "year",
y: "value",
z: (x) => x.indicatorId + x.geoUnit,
text: (x) => `${x.geoUnit} / ${x.indicatorId}`,
textAnchor: "start",
dx: 3
})
)
]
})