-
Notifications
You must be signed in to change notification settings - Fork 134
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
Allow vgplot to use DuckDBClient #1598
Comments
For now, the easiest way to do this would be to provide your own definition of import * as vgplot from "npm:@uwdata/vgplot";
const db = await DuckDBClient.of({trips: FileAttachment("lib/nyc-taxi.parquet")});
const sql = db.sql.bind(db);
const coordinator = new vgplot.Coordinator();
const vg = vgplot.createAPIContext({coordinator});
coordinator.databaseConnector(vgplot.wasmConnector({duckdb: db._db})); |
Thanks @mbostock , works a treat 👍 |
Not sure what else there is to do here. Maybe the Or is it sufficient to just have people redefine |
🤔 I think my expectation was being able to use This originally came about because we had a page with |
Similar issue here #1747 |
From https://talk.observablehq.com/t/observable-framework-using-duckdbclient-sql-with-vgplot/9676/3:
I would like to load data using DuckDBClient.sql() and display with vgplot. I am able to do this with Observable Plot:
but not with vgplot:
@mbostock responded:
The text was updated successfully, but these errors were encountered: