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
Export the vega API #39
Comments
Hi, @pschmiedel Could you make it more clear on which API methods you not able to use? vue-vega is just an adapter around vega View Right now I expose only one default object with install, mapVegaLiteSpec, and VueVegaLiteComponent, however, in near future, I want to leave only vue plugin as default object and other entities would go as ordinary exports Meanwhile I have a #6, to exclude vega and vega-lite from budle |
As I wrote above, e.g. |
I see, few questions if you don't mind ;) Did you use vega embedded with some vue component wrapper? I didn't touch vega schemas and other global vega configs yet, however as potential library consumer what do you think about next approach ? import Vue fron 'vue'
import vega from 'vega'
import VueVega from 'vue-vega'
// vega global configs
vega.scheme({/* collor here */})
Vue.use(VueVega, { vega }) |
No, I just used vega-embed without any vue wrapper. Your approach could work however there are the following issues:
Btw vega-embed does in fact export the imported vega object again. |
Currently, it is not possible to call vega APIs directly (e.g. vega.scheme) when using the minified version of vue-vega. Simply importing from vega and calling the API has no effect, since it is a different file (from node_modules/vega* instead of the minified file) with a different scope.
This could probably be remedied by something like this (in
index.js
):That way we could use the following to access the API in the same scope:
Alternatively, something like this could be used:
The text was updated successfully, but these errors were encountered: