Skip to main content
RapidDev - Software Development Agency
bubble-tutorial

How to build charts and graphs in Bubble

Add data visualization to your Bubble app using chart plugins like Chart.js or Chartmaster. This tutorial covers installing a chart plugin, connecting it to database data, configuring bar, line, pie, and donut charts, and making them responsive across screen sizes.

What you'll learn

  • How to install and configure a chart plugin in Bubble
  • How to connect chart data to your database
  • How to choose the right chart type for your data
  • How to make charts responsive across devices
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Beginner4 min read15-20 minAll Bubble plansMarch 2026RapidDev Engineering Team
TL;DR

Add data visualization to your Bubble app using chart plugins like Chart.js or Chartmaster. This tutorial covers installing a chart plugin, connecting it to database data, configuring bar, line, pie, and donut charts, and making them responsive across screen sizes.

Overview: Creating Charts and Graphs in Bubble

Visualizing data with charts makes dashboards and reports more useful. This tutorial shows how to add charts to your Bubble app using plugins, connect them to live database data, and configure different chart types.

Prerequisites

  • A Bubble account with data to visualize
  • A chart plugin (Chart.js or Chartmaster)
  • Basic understanding of Data Types and searches

Step-by-step guide

1

Install a chart plugin

Go to the Plugins tab and search for Chart.js or Chartmaster. Install your preferred option. Chart.js is free and widely used. Chartmaster offers more chart types. Both create visual elements you can drag onto pages.

Expected result: A chart plugin installed and ready to use.

2

Add a chart element to your page

In the Design tab, click + and search for the chart element from your plugin. Drag it onto the page. Set a size of at least 400x300px. Choose the chart type: Bar for comparisons, Line for trends, Pie for proportions, or Donut for category breakdowns.

Expected result: A chart element on your page ready for data configuration.

3

Connect the chart to database data

In the chart element properties, set the Data source to a search. For a sales chart: Do a search for Orders grouped by month. Set the X-axis to the month and Y-axis to the sum of amounts. Most chart plugins accept lists of values for labels and data points that you can construct from searches.

Pro tip: Use :group by with aggregation (sum, count, average) to prepare data for charts directly in the search expression.

Expected result: The chart displays live data from your database.

4

Customize chart appearance

Configure colors, labels, legends, and tooltips in the chart element properties. Set custom colors for each data series. Add axis labels. Enable tooltips that show values on hover. For brand consistency, use your app colors from Style Variables.

Expected result: A professionally styled chart matching your app design.

5

Make charts responsive

Set the chart element to 100% width of its parent group. Most chart plugins automatically resize. Add a min-height to prevent the chart from collapsing on mobile. Test at different breakpoints to ensure readability.

Expected result: Charts scale appropriately across desktop, tablet, and mobile.

Complete working example

Workflow summary
1CHARTS SETUP SUMMARY\n========================\n\nPLUGIN: Chart.js or Chartmaster\n\nCHART TYPES\n Bar: compare categories (sales by product)\n Line: show trends (revenue over months)\n Pie: show proportions (market share)\n Donut: category breakdown (expense categories)\n\nDATA CONNECTION\n Source: Do a search for [Data Type]\n :group by [category field]\n Aggregation: sum, count, or average\n X-axis: category labels\n Y-axis: aggregated values\n\nSIZING\n Width: 100% of parent\n Min-height: 300px\n Responsive: auto-resize enabled

Common mistakes when building charts and graphs in Bubble

Why it's a problem: Not aggregating data before passing to charts

How to avoid: Use :group by with sum/count aggregation in your search expression.

Why it's a problem: Overloading charts with too many data points

How to avoid: Limit to 10-15 categories. Group smaller values into an Other category.

Why it's a problem: Using the wrong chart type

How to avoid: Use Line for trends over time, Bar for comparisons, Pie for proportions of a whole.

Best practices

  • Use :group by aggregation for chart data preparation
  • Limit categories to 10-15 for readability
  • Choose chart types based on data relationships
  • Use consistent brand colors across all charts
  • Add axis labels and legends for clarity
  • Make charts responsive with percentage widths

Still stuck?

Copy one of these prompts to get a personalized, step-by-step explanation.

ChatGPT Prompt

I want to add charts to my Bubble.io dashboard showing sales trends, category breakdowns, and user growth. Which chart plugin should I use and how do I connect it to database data?

Bubble Prompt

Add a Chart.js line chart showing monthly revenue. Connect it to my Orders data type grouped by month with sum of amount. Add a pie chart showing orders by category.

Frequently asked questions

Which chart plugin is best?

Chart.js is free and covers most needs. Chartmaster offers more types and customization for complex dashboards.

Can I create real-time updating charts?

Yes. Bubble auto-updates searches on page elements. The chart refreshes when underlying data changes.

How do I export charts as images?

Use a JavaScript action to call the chart canvas toDataURL method, or use a screenshot plugin to capture the chart element.

Can I show multiple data series on one chart?

Yes. Most plugins support multi-series charts. Add additional data sources for each series.

Can RapidDev help build analytics dashboards?

Yes. RapidDev builds comprehensive dashboards with real-time charts, KPIs, filters, and export functionality.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Need help with your project?

Our experts have built 600+ apps and can accelerate your development. Book a free consultation — no strings attached.

Book a free consultation

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.