Plot.plot({
x: {label: "Trademarks"},
y: {type: "band", label: "Starting Letter"},
marks: [
Plot.barX(data, {
fill: "#ccc",
x: "length",
y: "starting",
sort: {y: "x", reverse: true}
}),
Plot.text(data, {
x: d => 0,
y: "starting",
text: d => {
const len = d.list_text.length
const size = 105
return len > size ? d.list_text.slice(0, size) + "...": d.list_text
},
fill: "#555",
textAnchor: "start",
dx: 5
})
]
})