Stickier vis config (launched)

Nate Agrin · Friday Demos · May 10, 2024 · 11:16

More work to keep vis config changes sticky with query updates

Try it yourselfThe full week on docsvisualizationworkbook

Transcript

This transcript is auto-generated. Names and product terms may be wrong.

  1. more demos cool I'll go um I've been working in the viz stuff for a couple weeks now um so mostly doing behind the scenes refactoring stuff that customers will hopefully never see um but also along the way fixing some bugs so I'll just go through a couple of them uh so there is this one fun bug uh for those who are newer um the way we manage dates in our front end has uh has like long been a little bit of a disruptive um practice and we've finally sort of uh standardize things and and stabilize stuff but there was one last one that we encountered in last week around raw dates not translating between the table and the chart so now these dates should totally

  2. match um they do previously they would be off by a couple of hours because the dates in the viz would shift to your local time zone and now they don't um there's another fun one that uh I fixed it sort of falls into this bucket of uh of things around like when you configure a viz uh at times it can sort of drop settings so there was like a small issue where if you change the color on something and then started to drag and then realized like oops I didn't mean to drag that one and let it go it revert to the standard color and now it doesn't but you can see if I like um oh actually I'm wrong it does stay the same

  3. here um if I like remove it and put it back it'll probably revert there we go um so that's still ongoing work that that I'm playing around with um another fun one uh I released this behind a feature flag but um technically it's been out for a couple weeks at least behind the flag uh you can create box plots now and box plots really work best with uh like dimensional values that are numeric obviously um you can kind of squeeze in a measure here if you really want to um but it often doesn't produce exactly what you'd expect and then um another fun thing is you can you can split these by uh who what's going on here oh weird it double mapped retail price

  4. so this is why it's still behind a flag um but if I map category to X you can see it splits it out by the category that was fun uh required actually fixing some core behavior in uh Vega light itself um and that's now all merged in Upstream in vegal light so that's cool um I had two more demos oh okay yeah I remember what they are um okay so let's talk about uh this other slew of issues so we often get this feedback about like um people start configuring charts and then make a change and lose everything and uh it's kind of subtle um but I'll try to give a demo of how this happens um so right now I'm on playgrounds um and

  5. if you do something like graph two measures against a dimension and then you um like change a color uh and then you change a chart type if I remember correctly yeah so it like dropped the color mapping it also moved these uh fields to to like different axes so it sort of reconfigured everything um and you know technically you can you should be able to click back and sometimes that works like in this case Cas it worked um but the general feedback is that can be a frustrating experience um so this uh I've been working on a couple changes recently um try to come up with a similar chart um well this is a little bit weird hopefully it's visible but there's technically two measures

  6. ploted against uh this Dimension gender and um and you can see I can color them here um and so now when I switch charts those colors are preserved so that's pretty sweet um another thing that so back going back to playground really quickly another thing that we see happen pretty frequently is um you know someone will configure something they might set up some colors um they might like split these uh two Dimensions to be against these two different axes or sorry two measures against these two different axes um and then they'll add a field and so if I add State here all of a sudden the whole thing everything's lost and um we get a completely different chart type um um so now I want

  7. to I want to pause for a moment and say this is kind of where we get into the territory of subjectivity where um there's a strong argument that this is uh like actually the best state for this chart um but what I've been playing around with is a subtle change where um if you've manually configured things we try to prioritize those configurations up front so notice I've set some colors I've moved these two measures to the right Axis if I add a new dimension the demo gods are with me nothing should change whoops demo gods are not with me in this case um let me try it again maybe I've uh got into a weird State okay all right so boom boom swear this worked

  8. this morning right so set some colors do some magic um then oh oh you know what it was I think if I add another measure uh so yeah so it preserves everything there let's try this Dimension again this was working this morning but maybe I switched my branch and forgot oh nope looks like it is mapping state to color oh actually uh it is I'm sorry I've forgotten my my actual demo here it is actually doing the thing we'd expect so um what it's done now is instead of dropping all of these measures it's preserve them and it's added this Dimension to uh the color property um and so yeah I guess like there's some there's definitely some work to be done here to iron

  9. this out but the the general change in the algorithm is preserve any uh manually set properties so anything that the user is has configured um explicitly try to preserve that as much as possible and then for any other Aesthetics or encoding ch like color um that the viz supports uh try to slot in the new field there um so that's what's happening here instead of dropping all these measures uh so if I remove state in theory it should go back to uh oh that's the bug so States right now Fields aren't being removed in my new algorithm but you can see like when you drop State the colors are preserved so this this workflow I literally got working last night um so still very much

  10. like Alpha and has a bunch of hilarious bugs that need to be ironed out like a real fun one is uh I think if I rotate the chart um things can get like plotted incorrectly yeah like that um so obviously still some work to do here but uh but directionally this is something I'm playing around with to see if it feels better than you know like here if we uh if we like add New Dimensions things just get completely removed regardless of whether or not you've um added them manually and explicitly configured them this is awesome Nate the one thing that I I think comes up a lot it's kind of hard with our ux is like you're want to swap a field and not

  11. really change a lot like but in order to swap it you had to like move one thing in and move a thing out and so you just like have these multiple opportunities for things to potentially get re jiggled you don't want to maybe we can also think about a ux to like from maybe the field or something to switch the field or some other way to make swapping easier could probably alleviate a handful of those issues too where you're like I just need to move some things in so that I can move other things out might be fun to play with too totally yeah I mean the nice thing is in theory if this works um I can change the colors here and then I

  12. can like completely remove gender um and I can you know add a different dimension and so like all the colors stay static so it's a for these small changes like swapping a field um the config is much better at preserving itself now