Skip to content

Commit

Permalink
document arrow support (#2120)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock authored Aug 5, 2024
1 parent 0f884a2 commit 67736b1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/features/marks.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ linedata = [
]
```

:::tip
For larger datasets, you can more efficiently pass data using an [Apache Arrow](https://arrow.apache.org/docs/js/) table as a columnar data representation. <VersionBadge pr="2115" />
:::

Then you can pass the data to the line mark, and extract named columns from the data for the desired options:

:::plot https://observablehq.com/@observablehq/plot-accessors
Expand All @@ -239,7 +243,7 @@ Plot.lineY(linedata, {
```
:::

For greater efficiency, Plot also supports columnar data: you can pass parallel arrays of values to each channel.
For greater efficiency, Plot also supports columnar data: you can use an [Apache Arrow](https://arrow.apache.org/docs/js/) table as data instead of an array of objects. <VersionBadge pr="2115" /> You can even pass parallel arrays of values, or Apache Arrow vectors, to each channel.

```js
Plot.lineY({length: linedata.length}, {
Expand Down

0 comments on commit 67736b1

Please sign in to comment.