Ridiculously pretty KPI tiles

Sarah Waterson · Friday Demos · January 17, 2025 · 4:57

Sarah shows off some beautiful new KPI tiles for displaying a series of metrics and orienting the current metric vis-a-vis a historical distribution. Gives a nice flavor for the…

Try it yourselfThe full week on docsdashboardsvisualization

Transcript

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

  1. yeah um but I will I'll I'll do a demo um yeah so oops let's go back uh oops we'll just skipped ahead and get to the right spot so this is the uh demo this is a dashboard that Trevor shared with me that he wanted to see if we could copy uh so it's got these little uh cards here that are each doing a different um type of mortgage rate and then there's some you know just some info here and a nice little tick chart that's kind of just showing where the current value is amongst the last 52 values um and then two charts there's some things in here that are really cool that we we just can't do like they have some really nice

  2. uh like brushing um and cross filtering um but uh I wanted to see if we could kind of make these like kpi cards because they're pretty they're pretty cool um and I did uh so I was able to get a pretty close Style Match and like pretty sweet little T here really easily like I wanted like I wanted to call it some really cool like I I mean this is probably people that are building stuff all the time get this um but I I was able to go for some of these like kpis I think I'll do where is the one um oh yeah you can see uh I basically like to duplicate them let me see if I can get everything going here sorry

  3. I have this loaded up um I used a lot of Cals that I could then um reference those Cal values in the uh markdown for like class names and putting vales oh my gosh this is really slow uh embarrassingly slow actually um sorry I should have loaded this I don't know why maybe refresh something weird happening well uh it's unhappy right now um I can't even get the chart what if I go back to the dashboard well I'll just say uh I used the Cals and then the really easy way to duplicate it was I made a field swapper and I just like put in a different field for each of these values and then it just pre-populated the whole thing so like I didn't

  4. have to like recal recreate all the Cals and all the stuff I could just like build a field swapper and then just duplicate the tab and make the thing so it actually made that making like copies of a markdown tile super easy um yeah I will share we've um we we've heard a couple requests for like templated markdown tiles yeah I'm curious what your thoughts are on in terms of like how easy this would be for someone to implement well that's the I wish I could show you what well there there we go you happy now um um let me get these guys out of the way um like the markdown itself I mean it's like a lot of CSS um but like I'll hide

  5. that out of the way but the The Styling it looks big because I have some icons in there that I slapped in through uh svgs the thing is like I use this this isn't the one that has a field swapper on it though um used these guys with a field swapper so like I could just like switch whatever goes in here and then all these guys went so like if you could temp this field and then make all those things work it wouldn't be that hard I don't think if you could interesting how to do this so like effectively is you can replicate this query and then just put a field swapper on column B and theoretically assuming that we could install that query there's

  6. some interesting so and I and I did it like it's I should have put the the actual field name up here so you could see it changing but it is just like switching out the things and then there's some differences cuz some formats like some of these are you know dollars versus not so that's a little bit sticky but um I do think there's an interesting space to get into for this templating it would be fun to te that yeah but yeah yeah kind of as you say it like some mix of Cals that tie to a table structure plus like the markdown code effectively as a template at this point because the Cals give us like the indirection and then the markdown gives us

  7. like the visual templating yep yeah and so yeah so and this like this is a little because it has a little like it does the up and down arrows and stuff like that so these these do get big right this is still a pretty hefty sized thing to put in there but um but not that hard to make really so um it was a fun little challenge I can go next