Plot.plot({
marks: [
Plot.barX(
dataset,
Plot.groupY(
{ x: "count" },
{ y: "URL", fill: "#65a7ff", sort: { y: "x", reverse: true, limit: 10 } }
)
),
Plot.ruleX([0])
],
y: {
tickFormat: d =>
d.replace(
/^(https?:\/\/[^/]+)(?:\/(.*))?$/,
(_, root, path) => (path ? path.replace(/\//g, "") : root)
)
},
marginLeft: 200
});