Skip to content

Arquero shorthand #449

@mbostock

Description

@mbostock

Currently to use Arquero, you say:

Plot.plot({
  marks: [
    Plot.tickX(table.indices(), {y: table.column("age"), x: table.column("percent")})
  ]
})

But with a little magic, we could support shorthand for Arquero, treating it like an array of objects:

Plot.plot({
  marks: [
    Plot.tickX(table, {y: "age", x: "percent"})
  ]
})

Specifically:

  1. If data is an Arquero table, then data is data.indices().
  2. If data is an Arquero table, then field names are interpreted as data.column(field).

Metadata

Metadata

Assignees

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