Description
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).