How to create a Pie Chart in Bubble.io
In this Bubble.io tutorial we demonstrate how to create a Pie Chart in Bubble using ApexCharts by Thimo.
Unlock the power of pie charts: Learn how to visualize product sales data in Bubble.io!
Master data visualization: Create stunning charts in Bubble with our step-by-step guide.
Elevate your Bubble skills: Discover how to use Apex Charts by Thimmo for impressive data representation.
Creating Beautiful Data Visualization in Bubble.io
Welcome to another video looking at the topic of beautiful data visualization in Bubble.io. Basically what I mean is how to create really good-looking charts in Bubble. And to begin with, in an earlier tutorial I've demonstrated how to create this area chart or line chart with my data down here. I've called these purchases and then it visualizes purchases grouped by each month.
Adding Products to the Database
But what have I wanted to visualize on a pie chart? How different products represent the sum total? So in my app data I've added in products, data type, jeans, t-shirt, trainers. I've also given to purchase a product field. So I'm going to add in a dropdown to my repeating group here. And this is going to be my way of quickly assigning a product to my purchases.
Setting Up Auto-binding
So products have got field called label. I'm going to say this is auto-binding modifying product. Because it's the first time I've set up auto-binding I just need to add in a privacy rule. And I'm just going to say for the purpose of demonstration in this app everything can be allow auto-binding on everything. So now if I refresh I can assign different clothing items to each of my orders.
Introducing Apex Charts Plugin
Now let's get into showing a pie chart. And so I'm showcasing here a plugin called Apex Charts by Thimmo. Really class act of a plugin developer. Some real quality plugins out there. And this is the chart plugin that I keep coming back to. And so I'm going to be creating a pie chart just like this one.
Adding a Pie Chart to the Page
If I scroll up to the top I can go page editor. And this is his pie chart that he's got as part of his demo. So let's get the pie chart element. I can access this because I'm already subscribed to his plugin. I've added it in through the plugin store. So let's add in a pie chart.
Configuring the Pie Chart Data
And so the series data is going to be do a search for purchases. And I'm going to group by the product. And I'm going to add a new aggregation. And that's going to be count. And so in fact I'm going to demo two different ways of doing it. First of all I just want to know the number of orders of a particular product. How that looks in the whole using a pie chart.
Setting Up the Chart Labels
So I'm going to use count. And then the data is going to be each item's count. And then I'm going to copy and paste this into here. And instead of count I need to provide a label. And so that's each product's label. And let's preview that.
Visualizing Order Counts
Okay so t-shirts make up three orders. Three out of six. So that's half. So there we have t-shirts showing up half. And then trainers two and jeans one.
Changing to Sum of Order Amounts
What if I wanted to see a pie chart based on the amount, which is this number here, for each order? Or rather grouped by the product. So I'm going to change my group by. And I can just add in another aggregation. And this time it's going to be sum and it's going to be amount. And I'm going to change this to group by product. And this time sum of amount.
Enhancing Chart Appearance
So trainers looks like it should be the largest one. There we go trainers. So that's the sum of all the trainer values. And the same for jeans and t-shirts. Let's do a few things just to make this chart look a little bit more attractive. So I can add in some prefixes. Let's get the right ones in here. Data label prefix.
Adding Currency Symbols and Formatting
So I think if I put a dollar sign in there. Let's check that. Yeah I'm now getting a dollars sign on the tooltip when I hover over. I think I can also adjust decimal places. Does that need decimal? decimal.mat. So I can change this to zero.
Final Result
Okay there we go. So that's it. That's how to create a pie chart in Bubble.
Ready to Transform Your App Idea into Reality?
Access 3 courses, 400+ tutorials, and a vibrant community to support every step of your app-building journey.
Start building with total confidence
No more delays. With 30+ hours of expert content, you’ll have the insights needed to build effectively.
Find every solution in one place
No more searching across platforms for tutorials. Our bundle has everything you need, with 400+ videos covering every feature and technique.
Dive deep into every detail
Get beyond the basics with comprehensive, in-depth courses & no code tutorials that empower you to create a feature-rich, professional app.
Valued at $80
Valued at $85
Valued at $30
Valued at $110
Valued at $45
14-Day Money-Back Guarantee
We’re confident this bundle will transform your app development journey. But if you’re not satisfied within 14 days, we’ll refund your full investment—no questions asked.
Can't find what you're looking for?
Search our 300+ Bubble tutorial videos. Start learning no code today!
Frequently Asked Questions
Find answers to common questions about our courses, tutorials & content.
Not at all. Our courses are designed for beginners and guide you step-by-step in using Bubble to build powerful web apps—no coding required.
Forever. You’ll get lifetime access, so you can learn at your own pace and revisit materials anytime.
Our supportive community is here to help. Ask questions, get feedback, and learn from fellow no-coders who’ve been where you are now.
Absolutely. If you’re not satisfied within 14 days, just reach out, and we’ll issue a full refund. We stand by the value of our bundle.
Yes, this is a special limited-time offer. The regular price is $350, so take advantage of the discount while it lasts!