Closed
Description
When creating a plot using Observable Plot, I found that using the APIs was a good experience; however, it is essentially impossible to do anything outside of them. It would be nice to have an ”escape hatch” (a customize
option callback that takes either a d3 selection or just an HTML node?) in various places to allow for arbitrary customization.
proposal:
Plot.dot(athletes, {
x: "weight",
y: "height",
stroke: "sex",
customize: el => el.on('mouseenter', (e, d) => alert(d.sport))
}).plot({
x: {
customize: el => el.selectAll('.tick').remove()
},
})