Skip to content

document arrow support #2120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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