{
const panzoom = vl
.selectInterval()
.bind("scales")
.translate(
"[mousedown[!event.shiftKey], window:mouseup] > window:mousemove!"
)
.zoom("wheel!");
const brush = vl
.selectInterval()
.resolve("union")
.on("[mousedown[event.shiftKey], window:mouseup] > window:mousemove!")
.translate(
"[mousedown[event.shiftKey], window:mouseup] > window:mousemove!"
)
.zoom(null);
return vl
.markImage({ width: 30, height: 30 })
.data(heightWeightPokedex.filter((x, i) => i < 1000))
.params(panzoom, brush)
.title("Weight vs Height")
.width(900)
.height(400)
.encode(
vl.y().field("heightm").scale({ type: "log" }),
vl.x().field("weightkg").scale({ type: "log" }),
vl.tooltip().field("name"),
vl.url().fieldN("img")
)
.render({ renderer: "svg" });
}