Skip to content
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

[bug] Object vs Array for "data" attributes in Vega react wrapper #368

Open
hydrosquall opened this issue Mar 18, 2021 · 0 comments
Open

Comments

@hydrosquall
Copy link
Member

It looks like passing an array instead of object as described in the docs doesn't currently work, and that the data attribute always needs to be an object, just as the VegaLite example required.

https://a.cl.ly/mXu10bL8

https://github.com/vega/react-vega/tree/master/packages/react-vega#approach2-use-vega-generic-class-and-pass-in-spec-for-dynamic-component

I wasn't sure if this is a bug in the Vega component, or a documentation fix.

Here's a minimal Codesandbox to reproduce: https://codesandbox.io/s/boring-gareth-4ep0t?file=/src/App.js

I came across this bug because I was trying to make multiple datasets available to the data attribute (so that different layers could reference different datasets). I was wondering if doing this is meant to be possible through the react-vega wrapper, or if this is a usecase that requires using react-vega directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant