
Vega not Lite
A first look at building visualizations with Vega rather than Vega lite. While usually too complex, this opens up some options for more advanced visualizations that are not currently…
Transcript
This transcript is auto-generated. Names and product terms may be wrong.
I I'll do a de a totally half-baked demo that um that may may or may not be feasible but uh Jess was telling me that we have a hard requirement to support uh sanki which we definitely don't do so the thought is to support actual Vega um so we we have an advanced mode where we support Vega light this also will work with actually supporting full Vega it's going to be more complicated than I thought Vega definitely treats data um differently so this works only for this very canned canned uh demo but not not more generally too but it's something that maybe we can think think about uh doing I'm I'm want to poke around a little bit more too because then it would open
up everything that Vega supports in addition to everything that Vega light supports too which is definitely not not 100% of what Vega does so that's that's what sorry go ahead I was just gonna ask can you or somebody explain for silly people like me what the like Vega light vers Vega like I know they're two different things but um what's like the benefit of why we chose vegalite over Vega so vegalite vegalite has a uh they're like similar and vegalite ultimately basically compiles to a explicit Vega spec it supports a narrower class but like you know most of the default type type charts um and supports some interactivity uh as well but ultimately you can think of it as vegalite is a simplified subset of
Vega that compiles into Vega and is actually executing Vega under underneath the hood Vega gives you even more uh control but requires much more uh you know sort of detailed it basically it's more complicated and so like you left to right your your spec is much larger you have more control over layout and and interaction and individual elements and the like but uh but it's not uh you know when you you have you have to go and enumerate everything too so you could sort of think if it is like a lower level language or a lower level specification for it so like it's very much the same it is literally the same embed code for us it's just the specification for the user to to
build well we so our specs now that we write for our current like this stuff are vegalite right yeah would we switch and then just like give users like vegalite UI I mean like I'm just wondering mostly for some of like the things like little things that we bump into with Vega like I can't position the legend exactly where I want or a label or something like that or get some of interaction like or does it just make sense to keep where we have I I think we probably want to keep what we have um like this is more just like a release valve for for sort of a like class or type of charts that we don't currently support um that said though actually
I'm not 100% short is going to be feasible to even put it in to to be honest too so like this was a this is a nice little Spike but but uh it may it may be something that we actually don't want to to ship interesting and is that it's just so hard to make it take our table is that the problem they like yeah so veega light does a lot of processing and like generation of data and generation of transformation steps in Vega to be able to use that data so like even just making the simple charts that we've got live and translating them they're always going to have like a you know like in in this case I think it's like two or
three different data sets for like this simple line chart that I I showed um is there a way so this is going to sound silly is there a way to not even care about that we yes yes we can um basically what what we could support explicitly is we give you a single data set that's a query result data set too and you have to do everything everything else yourself for it and basically there's no translation step or layer for it and I think we probably can do that as a true yeah I I don't think that I think even that would solve the actual problem that we have which is the release valve side of it now you you're gonna have to be able
to build something with it so like if if what we give it you can't do anything with it's worthless but I don't think that we need people to touch our Vega spec because Vega light does everything that we need there this is going to be purely for building the crazy things that Vega like can't even do so sanky um so I I would sort of UNC constrain yourself from the fact that we need to build our current charts for sure yeah I I I think that's that's definitely right and I think my my suspicion is we probably don't even want to show this in the UI and like it is something that's kind of like an undocumented feature that uh that we may be supporting
because we we do get we do get uh you can render it it can exist in a dashboard you could you could render it for a PDF and stuff too just natively it's just building these will be not not so fun