-
Notifications
You must be signed in to change notification settings - Fork 140
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
vl #501
vl #501
Conversation
This ends up loading two versions of |
Nice! and, to consume a JSON spec, we can do this: ```js
function vlFromSpec(spec) {
const div = document.createElement("div");
const view = div.value = new vl.vega.View(vl.vega.parse(vl.vegalite.compile(spec).spec));
return view.initialize(div).runAsync().then(() => div);
}
```
```js
display(vlFromSpec({ … spec …})
``` |
I wonder if we should expose an additional method to render from a JSON spec like I did above; but maybe there is already something in this vl object that does it and that I'm not seeing. |
I guess we should add vega-tooltip as a dependency… 🤔 |
Adds the vega-lite-api to recommended libraries as
vl
. The equivalent JavaScript is: