Skip to content

Optimize field shorthand for columnar data? #191

Closed
@mbostock

Description

@mbostock

We currently support field (named properties specified as strings) as channel value shorthand, e.g., y: "foo" is upgraded to y: d => d["foo"] or equivalently y: data.map(d => d["foo"]). For Arquero (and perhaps other column-oriented data structures), this still works because Arquero provides an object iterator; however, it’d be more efficient if Plot supported the same shorthand with Arquero’s column accessors, upgrading y: "foo" to y: data.column("foo") y: data.array("foo"), which returns an iterable over the values. Although, currently this would still involve copying the column into a new array, so we actually want y: data.column("foo").data if possible (e.g., Arquero’s Column class could support an toArray method which returns the data if possible, and otherwise constructs a new array using the iterator).

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