How to make reusable charts with AI
Every researcher knows these two problems.
1. Your software won’t make the visualization in your head. So you compromise. You ship “close enough” and tell yourself the client won’t notice.
2. When you do get it right, you’re trapped. You hacked it together with copy and paste, so it can’t update. Next wave you do it all again by hand: paste the numbers, fix the formatting, check every label. Your best work becomes your worst job.
AI can solve both, but not the way most people try.
In this session, Displayr founder Tim Bock shows you the smarter way: how to describe exactly what you want, get AI to build it, and make it update itself in seconds when new data lands.
Build it once. It works forever
What you'll learn
- Create: Describe the chart you want and let AI build it.
- Refine: Customise the design, fix mistakes, and get the result you need.
- Reuse: Make charts update when your data changes, without rebuilding them from scratch.
You’ll see practical techniques using Displayr Chat, Claude Code and Codex, including the common pitfalls to avoid.
Who should attend?
Market researchers and analysts who create recurring reports, work with tracking studies, or spend too much time updating charts in PowerPoint or Google Slides.
Transcript
I find myself saying the same thing every time I do a webinar on AI. It's quite amazing what has changed since I last did that webinar.
We are going to say the data visualization has just reached a tipping point — tipping point where we can start to do really, really cool things with AI. And you can start to do really cool things with AI. I I think this is going to be the biggest jump up we're going to see in what we can do in research using AI since text coding.
We are going to walk through quickly how the economics of data visualization have changed. Then we're going to look at some examples. And then we're going to summarize with some principles. But as always, there's this nervousness that the audio or the video is not working properly, so a few thumbs up or something would be awesome if you can do that.
Thank you, Kim. Nice to see you, Kim.
If you love data visualization as much as I do, I think you're going to start to use a lot more AI than you did before. And I need to warn you that AI usage is capped. If you use this feature a lot, you're going to need to buy more tokens. We don't really make any money on tokens. We kind of pass through those costs.
If you want know more, there's a little help article. And we're going to share this webinar with you, and we're going to share these slides.
How AI changed the economics of custom data visualization
If you want to create a pie chart or a bar chart or any standard chart today, you can do it in seconds. Drag and drop. Click Insert. Depends what type of use.
If you want to make it so that it represents the data well, you're going to customize it a bit. Now you're up to minutes of investment.
You want it to look good so that people go, wow, this company has good design standards? Well, we're into many minutes of work now.
You want to make it look really good and accurately represent the data? Well, we're now in debates between the data scientist or the researcher and the designer as they're compromising between style and substance. That can take hours, particularly if I'm in the room. Or you want to do something truly bespoke.
Let's have a look at this beautiful one.
A whole lot of work went into something like this. How much work? I imagine it took days and weeks for the people who created it.
Now it's very rare in a commercial situation that you're writing a report that you're going to spend days and weeks on a visualization, partly because you've got 20 or 30 visualizations to create. So if they're each going to take days or weeks, you're in a lot of trouble. And so for me, as somebody who really likes that cool visualization, that has always meant that when I've gone down the path of customization, I've often investigated automating things a little bit more, making something that's reusable.
And when I do this, it's not quite as pretty as something like this, and it ends up costing months of work. Sure, the original estimate that I get, or the initial estimate, is this will take about a week, Tim. But by the time you discover that well, people who are building it discover that, no, they can't assume there are any FF4 series in a chart. No, it's not the case that the first series is always called brand awareness.
No, it's not the case that the data doesn't have to get updated. By the time you work all this stuff out, it turns into months and months of paying an engineer. It means tens of thousands of dollars. And so very few people ever build these reusable custom visualisations.
I even come across some of the really large research companies in the world, and they don't even have this built. They'll have some Excel macro that's cobbled together. You click a button and spend fifteen minutes fidgeting to just get it to kind of work every time you create the visualisation, every time you update the visualisation.
So if you do invest in building the reusable custom visualization, the benefit you get is big, because you can now create something bespoke, something interesting, something novel, something special for your data with the same time it takes you to create the pie chart.
The cost sits over here.
And this is where AI has completely changed things. The cost to build something that's reusable and custom has gone from months of work to hours of work, and to, as I'll show you later, minutes of work. It's a massive change in the economics.
When we create effective data visualizations, there's 10 factors we're trading off. Well, I have a sip of coffee. I'll let you read this.
What I'm going show you in this webinar is how AI has led to a massive improvement in terms of our ability to customize visualizations and the whole effortlessness of making a visualization.
And this leads to three tangible benefits. It's much easy now to create expressive visualizations. It's much easier to have everything you build on brand. And it's much easier to do things that are beautiful.
What AI hasn’t changed: trustworthiness, responsiveness, and reusability
But there are some things that today, AI has not changed. And they relate to trustworthiness, responsiveness, and reusability. These are things that when you take on your own visualization creation, you now own these problems. So let's look at them in a little bit more detail.
Here I have a table, a standard Displayr or Q type table. I've got two statistics on it, the percentage and the count.
Claude Code does a great job at visualizing these, I think. I think it looks prettier than our visualization. It's got its own problems, which we might talk about if anyone asks. But it's much prettier. The one here is much prettier. So... And I'll show you how I did this later. I've built my own version of this using chat.
Trustworthiness
Now, the first thing you have to question whenever you do anything in chat, is the actual answer trustworthy? Everyone doesn't use the word hallucination quite as much as they used to, but it is the case that AI regularly makes mistakes. What makes data work really hard is the AI can make the mistake.
And how do you know, right? If it says it's 22% and the correct answer is 32%, how do you know? It's not like when it gives you a recipe and you go, well, it's looking for a duck, I'm cooking a vegetable curry. Something's gone wrong.
One of the ways you can deal with trustworthiness and protect yourself to make sure your work is trustworthy is to keep very clear what engineers would call separation of concerns.
And in the case of creating a visualisation, in practice, this means I don't think you should ever pass your data into a visualisation, or ever the strong way. But you generally shouldn't. What you should do is you should treat visualisation as a presentation layer on a table. Get the tables computed.
You can check them independently. And then just have the visualisation visualise the table, because it makes the verification much easier. It's much easier to have a visualisation that you've created, big no code to the table that you can trace back to the raw data. So that's trust.
Responsiveness
What's responsiveness about? It's not a word that we use in research a lot. So responsiveness effectively essentially refers to the idea that the thing we've created will respond appropriately when its world changes. So if I drag this thing horizontally, you can see it is responsive.
If I merge together these two categories in the input table, the visualization is responsive. If I swap out the data and say, let's look at the gender data here instead, something didn't quite work. So I failed in my responsiveness. Now, here, it's our job now, if we're going to create our own visualisations, to make sure that they are responsive.
We'll talk a little bit more about how we do that later.
This one's quite an easy one to fix, so it's updated. Now, that's what responsiveness is about.
Reusability
Reusability has two basic ideas in it. And that's great simplification. Just going to take that one back.
The key aspect of reusability is that one of our colleagues can use what we've done without needing to run AI. Now, what you'll see with all the visualizations that we're going to take you through today, we're going to use AI to build the visualization. But it's not actually drawing the visualization. What it's doing in the background is it's writing a heap of code.
And so the reason that the visualization was so responsive when it changed the data was it didn't have to go to AI and ask to update.
The code was already written to deal with that responsiveness. And that's why we own that problem, because we're going to tell the AI what to do. We're giving instructions, which leads to it writing code. If we're not clear about how we want it to be responsive, it won't be responsive.
Saving a chart as a reusable template
So I want to have everyone in my company use the bar charts like this. I don't have to give them an instruction. I can just save this template, put it in the folder, like I could have it company wide or have a particular clients, whatever. I'm just going to call this Claude Bar Chart.
Now I've created a template. And so now I can go to some other document. Right?
And I can drag across the table.
Now you remember, before I had percentage and count, and this table that we've got here has got counts and percentages. So we're going to put count on it.
Now let's insert our bar chart. You can see it's giving me a preview of what it looks like.
Let's hook it up. So you'll see that we have built, when I've created this visualization, I've customized the Displayr user interface. I'll talk more about that later.
Ta da.
So trustworthy, responsiveness, and reusability. And these are really the bits that Displayr as a company kind of is trying to help you with here.
Examples.
Live demo: building a bar chart race with audience ideas
The first example we're going to look at is not a classic market research one, but it's a fun one to play with. The rest of the examples will all be classic market research. Here, we have some data showing gross domestic product GDP over time from 1950 for a series of companies, countries.
How should we visualize that? And this is the interactive bit, guys. Into the chat field in GoToWebinar, not the questions field. Into the chat field, tell me what you'd like me to do. And we're going to build this visualization together. And you'll get a feeling for just how fast and how cool you can build things.
Burnley, if you give me some ideas.
Just got an idea. And I'm going to... And thank you, Wendy.
Well, I'm going to... Oh, thank you, Sharon. Should like a line chart that shows me change over time dynamically. We could do that. Let's be more ambitious.
Alright. Thank you, Kevin. Yes. That is the answer I was after. We want to do a bar chart race. I'm not going to do the line chart chart. It might be the best visualization, but let's do stuff that we can't do currently.
So I'm going to go over here. Here's the thing in a little separate project.
Create a bar chart race showing countries as bars. So a very short prompt here. Now, you probably don't know the name Bar Chart Race, but you're going to know what it is once it gets built, and we'll optimize it together. Alright. So it's going go off and do some stuff.
Live demo: a proportional image line chart
This next visualization is a visualization that I've been wanting to have in the app for years. But each time I get an estimate of how much it will cost for the engineers to build it, I'm like, I can't afford that. It's too much. It's not worth it. It's a feature where you give it URLs for images, and it scales images proportional to the underlying data.
Let's build it together. So in this case here, I've got a big blank area where we're going to have it. I've given it my input table, and I've given it my prompt. Now I'm going to copy this prompt and run it. And we are going to share with you all of these inputs that we've done. So if you want to refer to them later, you can.
I'm going to run it.
And while it's running, I just want to point out a few things. I have definitely laid this out with a little more care than I would if it was an actual real world thing because I want to communicate what I'm doing to you. So I put a little box around it, so input data. But if I had, I could have just selected the data and it would have shown it down the bottom here, and it would have figured it out.
With the prompt here, the prompt is actually very simple. The hardest bit, by far, when you're working with logos is getting clean, comparable logos or images of the cans. So some cans had sweat, some had little ring pulls, some were in three d. That was the heartbeat. I did get another AI tool to actually do all of that work and just create these images for me.
So it's going to go away and build, and we'll see what happens shortly.
Live demo: a custom bar chart
And that's the same page. This next one, the custom bar chart, this is... We're going to fire it off, and we're going to get it to do the same type of bar chart that I showed you from Claude before. Here's my input data that I wanted to plot.
Here's the example output. It's just a picture I screenshot throughout a Claude Code. Here's the prompt, a very different prompt to the one before. You can see this one super detailed. I've gone in. I've said, I want exactly what to show. I want it to show.
So if you look here, it says 14,227 coded sessions. I've said I wanted to show base sample size. I've been super specific about row heights, very, very specific. Now you saw in the examples before, okay, a quite simple prompt. This is a really detailed and specific prompt that even contains a check saying return error of this percentages and counts.
When you're dealing with AI, it's really the same as managing people in this regard. You can tell them how to do everything exactly.
And if your instructions are perfect and they're reasonably diligent, that's the fastest way to get the job done off. Or you can give them a lot of autonomy. And sometimes things go badly wrong, sometimes they have lots of iterations. So you've got all those kind of trade offs both ways with which is the best way to work.
Now, one thing you'll note here is I've got this box here because I'm telling it I actually wanted to draw the visualization this size and this shape. The two previous visualizations, I've told it nothing. It's going to have to make its own guess about what I want. We'll talk more about that later.
But let's kick it off.
Live demo: a grid cartogram of US election results
Now this last one, let me show you what it looks like, is something called a grid cartogram, one of my all time favorite data visualizations. Visualizations. Super cool. Here, we're looking at some data from twenty twenty four US presidential elections. I've done a few things a bit different here.
Well, actually, only one thing we do here, which is I've got a very narrowly defined margin of error because sometimes when people draw these visualisations, they'll have the Democrat blue at the top, the Republican red, and everything gets shaded proportionally. But it forgets that the way elections actually work is if you pass 50%, you usually win that particular vote. And I know there's seats and additional districts and stuff. Just ignore that for the moment. But in an election, 60% is the same as 100% in most systems, certainly in American systems. And so here, I've got a much smaller marginal error. So let's go, and we'll build this one.
So I've the grid cartogram. Here, I've got a really detailed set of instructions, again, telling exactly what blue I want, what red. We could probably figure that out again. I'm giving a very specific instruction to deal with missing values.
Now, my input example's got no missing values. And so if I don't tell it that we could have missing values, there's a good chance it won't respond appropriately to missing values. And so I've told it how to deal with that. Let's copy this prompt, and let's kick it off.
First results from the live builds
Here is the bar chart race. You weren't sure what a bar chart race is now? It hasn't quite finished. It's still thinking, but you can see what it's going to... So it's just a bar chart. It's not racing. He'll erase it.
Here's the proportional line chart. So out of the box, single prompt, not a very complicated prompt, it has gone and built us this proportion of image line chart, this dream chart that I've always wanted, a dream chart that I can save as a template, a dream chart that anybody then just custom pastes in the images, and it will line up with the underlying table. How cool is that?
Custom bar chart, not finished yet, still thinking. The grid cartogram, not finished yet, still thinking.
Not finished yet. Let us go. Well, let pause for a moment.
Now that you use AI, one of the secrets and tactics is you do multiple things at the same time. It's just like managing people.
Example: a clustered column chart with a total
Let's get back and look at what's next. Now I have shown you this one here, and we're looking at how to create it. I'm now going to look at some examples, I won't build live, but I'll show you how I built This one here is showing the classic clustered columns chart, but with a total. What I did was I created in Displayr a classic clustered column chart.
And I like to show the ages as different shades of blue to kind of emphasize the ordinate relationship with them. But the problem with a clustered column chart, some people call it a vertical bar chart, is there's no spot to show the total. And some people put the total on them, but showing the total's always problematic because the logic of this visualization is that the height and the area show the size, but the total subsumes all the other bars. So a traditional clustered contrast doesn't work.
So what I did was I just drew these rectangles on. I didn't aspire. I could just as easily done with PowerPoint.
And then I gave it the prompt, fit in the data, and now I've got this really cool visualization, which I built tooltips in. I told it I wanted to have little tooltips, and so I can hover over the bar, and it says Coca Cola's 43.5%. Or if I want to hover over the Coca Cola for 50 to 54, it shows 44%. I've got my own special custom legend. It's all built. I think kind of cool.
Example: a Voronoi tree map (and why it can’t be editable in PowerPoint)
Here we have a Voronoi tree map. What is that? It is this.
It's kind of a generalisation of the pie chart, where they're not required to be the wedges, and it's not required to be round. Now, this one here is an interesting one. I did a pretty short prompt. There's some input data, which I seem to have hidden inadvertently.
And then there's a background image. Now I had my colleague Claudia creatively create this one for me. Could have used AI, suppose, but I think she's a better illustrator for my kind of things. And the idea here was she creates a background image, and then I get the AI to build the image in the shape of the egg.
Now as you can see above, I did get it done, but it took a heap of iteration to get it done. Well, not quite true. The first time I did it, I got it in about fifteen minutes. This one here took me like an hour of nudging it, encouraging it, begging it to get me something like I wanted.
Now having got me something like I wanted, it is not just a static kind of thing. It's hooked up. It's a classic Displayr visualization in every other sense. So I can hook it up to my data, build the dashboard, export off to PowerPoint if I wanted to.
And so export. Export PowerPoint. And I say I can export it.
My client can export it because this is the dashboard, but I could also export.
Now as we talked about a little before with trade offs, we've got these 10 things to trade off. Somebody, if I don't address this now, is going to question time and go, I would like the Voronoi grid...
Okay. That's that. The Voronoi tree map to be editable in PowerPoint. And I would too, but that's a conversation to have with Microsoft because their technology doesn't really allow it.
It is the challenge there. And so we have to trade off. If we want editable, we're choosing Away Expressiveness Beauty on brand customizability if it was today. Big trade off we've got to make.
Let us have a look at what the export looked like.
And it's come through. So the images come through. It's just a standard PowerPoint. You can see all of the elements of it that were built up by Claudia.
I've got a little egg. The egg comes through as a high res picture. It's exactly the right size, the right thing, but I can't edit the data. That's just life.
Coming soon: export reports to Google Slides
While I'm here, a little advertorial.
It may already be in your region. If not, it'll be coming soon.
There is going to be in... Let's go back to the document.
Some of us have been begging this for a while. We do listen, and thankfully, AI has just made it faster.
With your reports now, you are able to... Will very shortly be able to go export report, Google Slides, not from view mode, just for you people who are trying to automate your clockings for your clients.
Iterating on the live builds and checking the AI’s work
So let's see where we're up to with our group exercise.
Alright. So it's finished the treatment.
Is tree map running?
It's not tree map. I'm confusing myself now. Now every time I tested this before, it worked really well, but this one doesn't seem to be running. It's not racing. So I'm going to give it some extra instructions. I'm going to put a play button so I can have it race.
And in the properties panel, have a control that controls the speed with which it animates.
What else would you like me to do? Any comments, put them into chat if you wish. Or if you can't find the chat field, put them into the questions field. How well should I make this visualization better? What ideas have you got?
Wants an area chart. Tina wants a map of countries. Yes. You can do them. Displayr already supports them. We're showing you here the visualizations which aren't built into Displayr.
Alright. Next. Brian has requested that we show a slider to control which country we are looking at and put dollar signs on the value labels and the flag for each country, and make the color of the bar match the main color in the flag. Alright. Let's get going.
Okay. We have built the custom bar chart tool. Okay? So we can now save this as a template.
Why AI struggles with spatial and mathematical reasoning
The grid cartogram is being built, but there's a little trap for beginners here. This is really, really important.
One of the things that we have the responsibility when we build the customization we, I mean you is checking that it's correct. Now, a lot of people have a slightly... A little too simplistic understanding of AI, and it is that AI is the same thing as magic.
But AI has... One of the well documented flaws of AI is that it's intuitively bad at mathematics.
And you might go, no, no, I keep reading. It's going to win all these medals. It solves 700 papers, blah blah blah. Yeah. It's a little bit of dishonesty, not dishonesty, a little bit of optimism in how all of that marketing has been done. It's definitely true and well established that LLMs are kind of bad at math intuitively. A year ago, they couldn't count the number of Rs in strawberry, and that basic problem still exists.
Now, usually, we don't notice it, because in the background, if you ask it a math problem, it goes and it writes that as a question in code, and it runs computer code in the background to do the math. I am pretty sure it's doing something very similar with all the big math proofs that we read about.
And even with the big math proofs, the ones that it's worked on, the ones where it's just run billions of trillions of simulations, just tries this, tries that, tries this, keeps iterating and iterating. It's not that it's logically using its logic. Now, this visualization has actually failed a little bit here, and it's put some of these things in the wrong spot.
And if you look down here, you can see that in the proper thing, it should be ME, Maine, New Hampshire, Rhode Island. It's three, and then we're going to have this four.
And if we look up here, we've got three...
Oh, we’re missing say. And what's happened is all of these things have been shifted a little to the right. It didn't quite get New Jersey above, below New York, which is kind of not surprising because New Jersey is to the left of New York. Very confusing.
So this kind of thing, it's a fun little job, but it is actually playing into the land where the AI can make mistakes. Anything where you've kind of got mathematical reasoning, as I said. So what we would do now is...
I should say, I'd even been really explicit. I knew that it was going to struggle. And I gave it really good instructions, but it didn't still get it. And so now I need to tweak it.
I don't need to go, nice work.
New England is not quite right. Now if I tell it that, that's not going to quite be enough for it because it's still going to get confused. And so I'm going to tell it that... Because the problem it has is bit bad about reasoning about space mathematically. So I'm going to tell it that New York should be above NJ.
So we're going to have to iterate a little bit more.
Now let's have a look at what we're doing here. So let's have a look. Maybe I missed this before. I've got a play button down here now.
How cool is that? I've got a slider if I want to manually control which country we're looking at.
Click pause.
Can't see what year it's at, Oh, it can't see the bottom right corner.
So the slider's not hooked up properly. The slider should change the year. Currently, it doesn't.
So obvious to you, you might say, should have done that. But have you ever told a colleague something you thought was obvious and you got the wrong answer? This guy's the same. Guy, girl, it, I suppose.
Read cartograms off doing stuff. Still not there. Got a bit more work to do. Not going to bore you with that.
Example: a brand health conversion funnel
I've wanted to build this visualization for years. I've twice kicked off projects, software projects, but I've had to cancel them because they always... It just became obvious it was going to be much, much too expensive. What it is is a brand health conversion funnel.
For those of you who are not familiar with this type of data, very common in branding research. So we have a sequence of things that we think lead to purchase. I have to know something. Once I've known it, I've got to try it.
Once I've tried it, I've got to consider it. Once I consider it, I'll buy it next month. So that's the brand health funnel. It's sometimes called in these visualisations called funnels, or if you're a statistician, you call them spindle chart.
Now, one of the standard things that branding researchers like to do is they like to show the conversion between the stages, because the insight's usually not actually numbers, it's in the drop off, which is shown. So you take 95% divided by 98%, which gives you the conversions, eaten divided by where, which is 96%. So I've done a few things in this visualisation. I've got it to lay all this out, I think, reasonably neatly.
I've got it to calculate the conversion. I've got a super complicated statistical test to work out which conversions are interesting. So if you look here, it's telling us the Predepain's conversion from consideration to eat is actually really high compared to the others. And when I say compared to the others, it takes into account the fact that Eaton is a predictor of this consideration.
So super cool. The other things that I've done here are one of them didn't work that well, so I need to iterate with it a bit more after. I told it to do a shading where the numbers overlapped the lines, and it did it, but didn't quite do it right. But what it did do really well is you can see here that it's colored borders around the numbers that extend beyond the bars.
So a pretty cool visualization. I showed this before, and someone said to me, oh, can you add this as an option to Displayr? And I said, no, you can build your own. Make it how you want.
Here's how I did it. I gave it the input data, in this case, the percentages and the standard errors, which are needed for the significance test. I, in PowerPoint, mocked up how I wanted it to look, and I gave it the instructions. And these instructions at the bottom, for me, and you probably wouldn't want to do this, I've written in a language most of who have never heard of called LaTeX, how I want the statistics to be calculated, very precise instructions about how I want to do the math, because that's just me.
But if you want to do it, you can. We will share this prompt with you. You can build it yourself.
I've still got a little bit of work to do. The way these lines aren't quite tying up neatly, I need to fix, but I think super cool. But wait. Something cooler.
Example: a labeled bee swarm with parallel coordinates
This is, I'm calling this a labeled bee swarm with parallel coordinates. The way we read it is it's showing for each country in Europe, and if you can't see my photo, I have little rabbit ears because the definition of Europe that Europe applies these days, often quite broad. But shown trust in institutions. So 65% of people in Europe trust the police, where here trust is a top five of 11 box score.
And we can see that there's a lot of variation. We can see that those thin... Their police must be really, really good.
Don't know if you guys have seen Sisu.
And those poor people in Ukraine, they're pretty unhappy in their trust in police. And now parallel coordinates means the lines connecting all the observations together, which make it easy to see patterns. And so we can see here that trust in the police and the legal system, while the overall trust in the police is higher than the legal system, it's highly correlated with very few of these lines crossing over. Whereas trust in the United Nations, it's all the lines are crossing.
It's not as strongly correlated to trust in the legal system. And if we go back to the Ukraine, hover over it, we see this big bar line showing us Ukraine. And we can see that the Ukraine...
I keep saying the Ukraine, which is just wrong. Apologies. We can see that Ukraine is actually not the worst in terms of trust with European and European Parliament. And not surprisingly, two countries that have been condemned by the European Parliament, Russia and Israel, have even lower trust than those poor folk in Ukraine.
So cool visualization. This one took me a couple of hours to get right. I had to provide it the input table country codes. Right? Because what it's doing in the background is it looks up the name of the thing and maps it to the code.
I gave a little example, which came from a wonderful visualization that UN had created itself. And then I gave it a super detailed prompt. Now in my prompt, I went into a lot of detail about the exact algorithm to clump things together.
Now the point that's a little nonobvious here...
Oh, wait. And I should say, my colleague, Matt, he managed to give it a two sentence prompt to get basically the same thing. So they're really well chosen two sentences. Or he had luck.
Not sure. And in truth, he used a better l than I used, which we were right out to. Anyway, the reason that I had to give it...
That took a lot of time for me is it struggled to cluster together or push together, or to use the jargon, pack the countries close together. Now, if you think about this from the point of view of the AI, it's not surprising. This looks like a scatter plot. And so the AI was imagining that there was some meaning in the vertical position.
I had to explicitly tell it that meaning only exists in a horizontal positioning. We're allowed a little bit of latitude to try and pack it in.
But just telling it to create a bee swarm, which I don't think I did in the initial time I asked to do it, gave it the shorthand code for the same thing.
Final result: the bar chart race with user controls
So let's have a look and see how a group exercise is going.
Alright. We can see that we've now got this thing working properly. We have got our awesome little bar chart race.
It also can be exported. It'll have the play button on it.
You can see that in the animation pane, I have control of which... How many countries to show and animation speed, whether it's going to be looped through it and even ask for these things. AI did it. So notice here, I've given a control for the user. Before, when I put those lines on the bee swarm with parallel coordinates, I gave a control to the user. And I've given controls to my team so that when we reuse it, we can customize in the background. Because one aspect of reusability, which I don't think I mentioned before, is you need to be able to tweak it without using AI for something to be truly reusable. And so that's been built in there.
Three factors that determine how long AI takes to build a visualization
There are three key determinants of how long it takes to build a visualization using AI. The first is the uncertainty of your requirements.
If you're vague or incomplete or, worse yet, contradictory, you're just going to spend a lot more time iterating.
And maybe you give it something that's impossible. The second is how complex what you're asking it to do. So the proportional images, it happened super fast. Everything was super fast. But with the proportional images, I gave it a very clear description of what I wanted. I had images that were in great shape, and it was able to just do it in a single shot.
With the Voronoi tree map, kind of much more complicated for it to do, much more hard problem to solve.
And this last one will take you a little bit of a while to get your head around because it's a different way of thinking about the world.
One of the things that determines the speed of AI at doing tasks is the extent to which it can verify if it has done things correctly. It needs to be able to figure stuff out. Now, if we go back to this example here, which fails a little bit, what the AI does when it builds it, it takes a snapshot by a little photo, and then it converts that photo into kind of little numbers effectively, tokens, to use the jargon, and then it compares those tokens with this thing down here. It's not... Now we, with our wonderful visual perceptual systems, are able to kind of, in our heads, imagine this thing on top of this thing, and that allows us... If we... Then if we push them side by side, it'd be more obvious. Let's move it up to make it a little more obvious. Let's see if this guy's responsive.
So now it's much easier for us to spot. We can see that Florida's in the wrong spot. But it's boring. We could probably live with Florida being there or Cuba.
It's a lot better. But the AI doesn't have our visual system. It's converting all these positions into tokens and just can't see. It's not seeing it the same as us, and that's why it kind of struggles.
And so the ability for the AI to verify what it's doing is a big determinant of how long it takes to do. Similarly, if we give it lots of controls and we tell it what to do, but we don't give it a way exactly checking if those controls are working, it's going to struggle as well.
Practical rules for prompting AI to build visualizations
And this leads to some principles. The first one is you need to work hard on your clarity when you're communicating with AI.
You want to list all of the known requirements.
It's a mistake to show half the requirements and let it figure it out. You're just giving it more work, more ambiguity. A lot of us have a tendency to make up requirements. We don't know the answer, so we just try and guess.
You'll have some colleagues who use some words they don't quite understand. It's common. If you do it with AI, you're making life hard. Better to not make up a requirement.
You want to be precise.
If you can use the exact terminology, it's a shortcut. Bee swarm. Voronoi...
I still can't do it.
Tree map. Tree map? Tree map. I think it's tree map. Spelled alright.
Tree map.
And I've created so many tree maps, but I still hate the word.
You want to be super detailed about stuff. Then you need to check and iterate. And, obviously, the less clarity you gave it, the more time you're going to check and iterate. And this last thing's really important.
It's so easy to go stupid AI, stupid AI, stupid AI. What I find most of the time when AI made a mistake, it's really stupid to assume your instructions are incorrect. Going back to the AI and going, try again, you've stuffed it up, doesn't often solve the problem. There's usually some hidden contradiction in your work.
Live audience Q&A
I hope you found that as exciting to watch as I found to create. It's a really fun topic. Let's see what questions you've got.
How many tokens would each of these use to set up? That's a fascinating question.
I'm going to make up a number here. I imagine this whole thing probably took $2 of thinking time to do everything that's being built from this visualization. So kind of a made up number. I don't think it's a material question. I get that you guys hate to have to pay tokens, hate to have to pay for stuff. We all do.
The benchmark I compare against is how long it would have taken me otherwise. And the kind of the rough rule of thumb that most people working with AI use today, most people, that's a horrible exaggeration, that is sometimes used by people that are sometimes clever, is that the AI token cost should be about 1% of the human cost for the comparable task. It can be much better. In software engineering, it's probably close to one thousandths of a percent.
You can if you want to check your AI usage. And if you want to measure things very precisely, you can go to your Displayr. You go to account settings.
If you look at licenses, it will show you how much of your AI tokens you've used and how many you have left.
If you wish to, you can also get detailed breakdowns of the usage by time. The thing that's really important to remember is, though, these things are greatly affected by how well you do here. If you give a dodgy instruction, you're iterating, iterating, iterating, you're leaving all the thinking to the AI, you've chosen to go slow. And when you choose to go slow, you're choosing to spend money in the case of AI.
That's probably the thing that's really important to appreciate. And we've all had, for those who've been consultants, we've all had that lazy client that didn't tell you information and wasted all of your time and you wish you were charging by the hour for. Well, AI is charged by the hour. It's smarter than us in some ways.
Sasha said, I flagged you. I've got that one. Can you export it as a dynamic GIF or MPEG or the like? You can't.
It's an interesting idea to build for the future. The problem you're getting to, though, and when I say you can't, there probably is a way of doing it today if you're super technical. But you're going to not find it very helpful. It feels like a clever thing to do.
But animated GIFs, or GIFs depending on where you're from, they're usually very, very large, right, because they've got a little separate image for each of the individual things. And so then all of a sudden, people can't download it. But if lots of people request, well, what kind of making that work?
And Jana, apologies if I've got your name wrong, says, I'm looking to add logos to my scatterplot of different brands to see their performance across different attributes.
At the moment, the client wants to have the charts editable, so to make this in PowerPoint, is there a solution for this?
No. Actually, there is a solution. There is a solution. Sorry. Need that.
Firstly, you do need to appreciate that you're trading off things. And it is... And sorry to be a bit lecturer about this, but it's the wrong way to think. I want to have everything and editable. It's like, you know, kind of saying, I want the Ferrari and a $100. It's just not how the world works.
What you could do, and let's give it a chance.
I don't know what'll happen here. I'm going to take a little cartogram here, and I'll take... What I'll do is I'll delete everything else that's in here, try and simplify its life.
And I made a mistake. I... There's something cool I had to show you, which is having built this guy, I can change his data and hook him up to the recent senate elections, and we can see the stuff that's gray, which and we can play around. There's no uncertainty. The election's finished and make everything exactly blue or red. Alright. So what I'm going to do is I'm going to delete this little thing.
I'm going to delete today. Come on, brain.
Okay. What I'm going to say to it is, please create shapes on the page that are like the tiles in the grid cartogram.
Shade the red versus blue based on the democratic column in the table.
It'll be interesting to see what this can do here now. So now we are using AI to actually draw the visualization, whereas everything I showed you before was using AI to create the code. So what we're doing now will not be reusable, or each time we run it, we'll have to get the AI to do it. So it's a slower and a more expensive way to work.
I don't think it's as clever a way to work in general because it's going to really get into that issue we talked about before that the AI kind of struggles with precision about certain types of tasks where it can't get good feedback. Anyway, we'll see what it does in the background.
Andrew says, sometimes I just want help using standard visualizations rather than having to create them. What's the secret I'm missing using chat?
I'm guessing. I don't know, Andrew. If could give me something more concrete, I'm happy to have a go at it. But you can get... So in the background, there are multiple technologies at work. If you ask for a pie chart or you've created a pie chart, you can get there to customize it, and it just basically uses options that are available too.
Or another approach that it has, if it doesn't find a good solution with one of our charts, is it will write them in a language called JavaScript, which will wrap in a language called R. Another approach you can do if it's appropriate, and this applies to any of the tabular types of things, It would write in languages of CSS and HTML. It can even do some more exotic languages if it really, really needs to.
So it will make those technology choices for you based on you being clear about what you want it to do.
So if you have a problem, reach out to me. Andrew, reach out to support. Happy to help.
And we've gone through everybody's questions. Hold on. Let's see how this visualization's going.
Oh, there you go. So we've now created the tree map as little shapes. Thank you so much. All of our customers and users out there, thanks for being our users. We love you.
Hopefully, those of you who aren't have seen something you like today.
Have a great rest of your day, everybody. Bye now.
Frequently asked questions
How do you create reusable charts with AI?
Describe the chart you want to an AI tool such as Displayr Chat. The key point is that the AI isn’t drawing the chart. It writes code that draws it, and that code is what makes the chart reusable. Once the chart works, you can save it as a template, store it company-wide or for a single client, and colleagues can drag in a table and insert the chart without involving AI at all. For a chart to be truly reusable, it should also include simple controls that let your team adjust it without going back to the AI.
Can AI-built charts update automatically when the data changes?
Yes, but only if you ask for that behavior. The code the AI writes can handle changes like resizing, merged categories or a swapped-in dataset without calling the AI again. The AI won’t assume it, though. In one demo, swapping in different data broke the chart until a quick fix was made. Typical assumptions to rule out in your instructions are a fixed number of data series, a fixed first series name, and no missing values. If you don’t say how the chart should respond to change, it probably won’t.
What determines how long it takes AI to build a custom chart?
- Uncertainty in your requirements. Vague, incomplete or contradictory instructions mean more rounds of iteration.
- Complexity. A chart with images scaled to the data was built in one pass, while a Voronoi tree map took far more iteration.
- How well the AI can verify its own work. It struggles with anything it can’t get clear feedback on, such as precise positioning or controls it can’t test.
How should you write prompts to get the chart you want from AI?
List every requirement you already know, and don’t invent ones you’re unsure about, because guesses add ambiguity. Use precise terminology where you can, since naming the chart type (a bee swarm or a Voronoi tree map, for example) is a shortcut. Be detailed about things the example data doesn’t show, such as how missing values should be handled. Then check the result and iterate. If the output is wrong, look for a contradiction in your own instructions before assuming the AI is at fault, because that’s usually the cause.
Meet the host

Tim Bock, Founder of Displayr
Tim is a data scientist, who has consulted, published academic papers, and won awards, for problems/ techniques as diverse as neural networks, mixture models, data fusion, market segmentation, IPO pricing, small sample research, and data visualization.
