
Mixed series stacking
The last piece of work underpinning our new vis pipeline - now you can build mixed stacked charts, including all the familiar UX around labels, series selection, etc.
Transcript
This transcript is auto-generated. Names and product terms may be wrong.
Um, this is a little confusing, but you know, on and off, uh, I've been working on this viz refactor for like the better part of a year now, and the last known blocker is, uh, just a bit of peculiar behavior in some of the old charts. So there's a bug, arguably a bug in the old pipeline where if you have a mixed, you have multiple measures and mixed uh mark types.
Your stacking is just ignored for the most part. So you can switch between overlay and stack and nothing happens. Um and so the issue this presents is um if like so the new pipeline absolutely supports stacking and if we simply enable the new pipeline as we did a couple months ago a bunch of uh visualizations will suddenly render as stacked and customers perceive this as in error even though technically it's not.
Um and they got really upset about that. So we need some kind of migration path and unfortunately going into the database and updating it all is uh that's just frankly impossible. We just have the volume of data we have now with the number of customers and the activity we have won't support that. So we need some kind of way to handle this in like in the app itself.
Um so what I've come up with is this concept of behaviors. You can see it kind of baked into the viz config over here. And the nice thing about behaviors instead of something like a version is it's pretty trivial to attach these behaviors to feature flags. Whereas versions typically follow a linear chronology. And if you get three or four versions deep and then suddenly realize there was something wrong with version two and you're on version five, it's pretty difficult to undo that.
Um, and so, okay, so like in this case, I have my feature flag for the last bit of work here disabled. Um, you can see stacking is not it's following the bug behavior. Uh, I'm going to go enable the flag, which you won't be able to see because I'm not sharing that part of my screen. Um, the way you can tell that the flag's enabled or not is I have this big red token here.
So this should turn green and the behavior we want to see is that um it remains unstacked. So we can see this is green now. So it's going through the new pipeline. And then just to prove that this is all working, if I create a new query with the flag enabled, um there's one small strange bug here, which is why it doesn't get enabled right away.
But when I refresh the page, um this should indeed be stacked. Yes, this looks goofy, but if you are asking to stack one series as a bar and another series as a line, this is actually correct. Um, and you can see in the viz config, this flag is now true. Uh and so this just enables us to finally squash the last couple of cases that have uh been blocking us from rolling out the full refactor to everyone and supporting all the multiple measures.
And you know, we've already been building into the multiple measure work. So like for example, assuming the demo gods are with me, like simple totals like this works now in the new pipeline. So this is why we really want to unblock this. Um, getting small multiples to work with multiple measures is trivial in the new pipeline. So again, another reason why we want to unblock this.
Enabling disabling series works trivially. So again, like another reason why we want to unblock this. So pretty important, but pretty behind the scenes.