Skip to content

Mark callback? #592

Closed
Closed
@j-f1

Description

@j-f1

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()
  },
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions