
Trellising in advanced vis
We've opened up size controls in our advanced Vega Lite spec. This opens up the opportunity for trellising with some hand tuning of sizing. This is a precursor to trellis / grid…
Transcript
This transcript is auto-generated. Names and product terms may be wrong.
next one uh this is actually a hilariously small change but I think potentially has some big impact um but basically uh I think it was Jess yesterday was asking about Tris charting and I was thinking about uh advanced mode like our library Vega under the hood supports fising uh but it has some peculiarities around how it handles Dimensions like uh height and width when it's in trellis mode um and so here's just a regular chart gender traffic Source user count this is the already deployed on playground if I open the advanced editor um in the past we didn't really let you control the height and width uh and so I made a really small change that lets now the user control the height which uh
in most cases is not something that they're going to want to be able to do because you know we've optimized our dashboards and whatnot to be dynamically uh scalable um but if you are trying to use trellising you do need to be able to manipulate the height and width and so I conveniently have this Vega config over here I'm going to paste in and basically you can see I've I've sort of implemented trellising sort of um in the sense that it works with Vega it does require a static width and height so it has constraints but if you're okay with that sorry can you use container W here uh not really unfortunately I can show you what happens um so it almost looks like it
works but it's cutting off the legend oh my God never E Yeah so it's um it's a cork of Vega they the width and height attributes basically code to the width and height channels of each individual subplot uh not the total canvas area um but what you can do is you can so you can take this thing it's just like a chart just like any other chart so I can save it you know obviously this doesn't look great because it's not scaling to The Container but if I don't care about that if I just want it to you know look like this maybe I'm just displaying it on a TV or something and I'm fine with the chart not scaling to The Container then uh
that's a totally adequate way and sort of a scape patch way of doing tring right now um I also validate this works in the scheduler so probably some similar constraints apply around like the width and height might uh in certain edge cases disrupt the scheduler but uh you do get pixels out so in theory you could make it work it definitely requires a little bit more handholding uh okay any questions about that before I jump to the next one yeah are there uh are there any restrictions on like the usage of this that are kind of known no I mean this basically in some sense kind of unlocks all of Vega light yeah um it just by by enabling the end user the ability to
manipulate the width and height you can yeah kind of do whatever yeah yeah cool