
Smart labels
The thumbnail says it all - a new labeling algorithm that means no overlapping labels. Beautiful scatterplots, lines, bar charts right out of the box. Rolling out shortly.
Transcript
This transcript is auto-generated. Names and product terms may be wrong.
all right cool um this is kind of like a Iceberg demo and that like what you see is pretty small but the level of effort to make it work is pretty high um this is what our charts look like today if you enable data label is like you little toggle here so this is just like a scatter chart right and similarly here this is what it looks like if you have like a stacked bar chart and you enable totals and data labels um so the the totals are always rendered at the tiptop and then you can see you get like all these little label overlaps uh so if I go back here and I add my feature flag in um this is what it looks
like with this diff that I'm I've basically am done with um so you can see it's using a new algorithm to to basically limit the labels um and make sure that they don't overlap uh one side of effect is when there's a lot of density it just doesn't render anything um but all of this stuff works basically supports like you know the functionality we have in our existing label implementation um you can like change font size stuff like that and then uh what's going on here so you can see here the way it renders in the stack bar chart is now the data labels are centered in the segments and the totals are not uded or overlapping with uh the topmost segment so like I
just remove this um yeah so the work to make this happen required basically forking the viz library that we're using um and then resurrecting some pretty ancient work from some open source contributors that has just been languishing and like getting going kind of deep under the hood to to make it all compatible and uh and the last bit of the work is just getting our infrastructure pipeline to get happy with building our local version of this Library um so yeah relatively small surface change but a lot of work under the hood to make it happen Nate this is awesome one ALS I think it's also significant to just call out that like this represents an engagement with the Vega and Vega light libraries that's a
lot deeper than we have had in the past and n's been working with the authors of those libraries a little bit more which I think is a really good like we we are heavily dependent on those libraries and so uh having the ability to collaborate with the authors and you know get our own changes in is going to be strategically important over time and uh this represents I think a substantial step in the right direction there too freaking awesome um how close to available is that like are there big contingencies in front of letting that go um or you know what's no so the the only issue is that I and trashed our build pipeline last night so I had to revert it uh and
I got to figure out how to like basically we have a fork and I'm telling our infrastructure to point to the fork and not to the public repository and for reasons I haven't uh figured out yet it doesn't like that so but that that should be small it should be done today and then um the only other issue is it's behind a flag right now and there's no way to get flags into the scheduler so the one used use case where I would argue this is most important is in the schedu OR context when you want to generate a PDF with like legible labels and um that doesn't work right now because it's behind the flag but I my testing of it has been pretty
stable so my instinct is just uh I might do like reverse flag situation where it's enabled by default and then if things go Haywire we can disable it but that would allow it to to work in the scheduler um and does it is it gonna work as you sort of shift screen size as well like how is um yeah so that real quick yeah yeah um and like just generally what is your sort of thought on performance it just it l it looked faster than I was expecting yeah so it seemed arguably pretty performant there are three algorithms we can choose from um you can see like sometimes they the labels shift around as it's recalculating them uh the one I think we're using is
the most performant but it sacrifices uh some you know Edge case possibilities of rendering a couple extra labels that might fit if it did a couple more passes yep um I think that's the right tradeoff by the way yeah the one thing that's you know I just want to emphasize like like all things in viz land like you can never make everyone happy and it's not going to be a p like I know for a fact that the very first thing people are going to complain about is like how come I don't have labels down here and um I have I don't have an escape hatch built yet that basically would let us like fall back to the old pipeline if we want to do
that but that could be one option the other option could be like there might be a way to under the hood alter the algorithm and try to tell to force label rendering if if customers opt into that um but you know this is one of the most highly commented viz tickets uh so I think this approach is you know objectively better than what we have today this is I literally have a dashboard that I want to put this on right now so let me know yeah wildly excited this is insane this is awesome dude yeah thank you I'll let you know once it's out today uh for the future flag is there any aside from rendering which you called out as like it won't work
there is there any other risks to turning on the future flag will it change I'm assuming it will change like change all of your existing charts that have labels uh to use this yeah correct it's a drop in replacement I I did the work to make it adapt to the existing label implementation um uh yeah you know there would be a visual difference like if someone for whatever reason has been conditioned to seeing their chart packed with labels like obvious sudden it won't be packed um uh I think I guess the only other risk is just to call it out is like this is now our well okay uh the library we're using is quite stable but also has not seen a lot of active
development for the last year um that's pretty well well known in the industry like other companies like hex who are using it you see like you can see they're also trying to contribute patches to it and they're just kind of sitting there on the Wayside but um that said like it's our Fork of the library and so the only other risk I would call out is like there might be unknown Gremlins in the fork because I built the fork off like the most recent version that they have in the repository um but in testing and in practice I haven't seen any issues like I haven't seen any charts not render or anything like that does that make sense yes it's awesome