Bubble Chart

What is a Bubble Chart ?

  • Profile picture of Mcs
  • by Mcs July 1, 2025

A Bubble Chart is a type of scatter plot where each point is represented by a bubble, and the size of the bubble represents a third data dimension.

A bubble chart is a type of chart that extends the concept of a scatter plot by adding a third dimension represented by the size of the bubbles. Essentially, it allows you to visualize relationships between three numerical variables: two represented by the X and Y coordinates, and the third by the size of the bubble. 

Visualizing Three Dimensions:

Bubble charts are used when you need to represent three distinct sets of numerical data simultaneously.

Bubble Size as the Third Dimension:

Unlike a scatter plot where points are plotted based on X and Y coordinates, in a bubble chart, the size of each bubble corresponds to the value of the third variable. 

Example:

If you were visualizing sales data, you could plot the number of sales on the X-axis, the revenue on the Y-axis, and the number of items sold as the bubble size.

Comparison to Scatter Plots:

Bubble charts are essentially scatter plots with an added dimension represented by the bubble's size.

Applications:

Bubble charts are useful for analyzing relationships between multiple variables, identifying trends, and making comparisons within datasets. 

Use Cases:

  1. Financial data (profit, growth, size)
  2. Survey analysis
  3. Population studies
  4. Performance comparison across 3 variables

Bubble Chart Example

<canvas id="myBubbleChart" width="400" height="300"></canvas>

<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
 const ctx = document.getElementById('myBubbleChart').getContext('2d');

 const myBubbleChart = new Chart(ctx, {
   type: 'bubble',
   data: {
     datasets: [
       {
         label: 'Company A',
         data: [{ x: 10, y: 20, r: 15 }],
         backgroundColor: 'rgba(255, 99, 132, 0.6)'
       },
       {
         label: 'Company B',
         data: [{ x: 25, y: 10, r: 10 }],
         backgroundColor: 'rgba(54, 162, 235, 0.6)'
       },
       {
         label: 'Company C',
         data: [{ x: 15, y: 30, r: 20 }],
         backgroundColor: 'rgba(255, 206, 86, 0.6)'
       }
     ]
   },
   options: {
     responsive: true,
     scales: {
       x: { beginAtZero: true },
       y: { beginAtZero: true }
     }
   }
 });
</script>

Comments

Add new comment

Restricted HTML

  • Allowed HTML tags: <br> <p> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <cite> <dl> <dt> <dd> <a hreflang href> <blockquote cite> <ul type> <ol type start> <strong> <em> <code> <li>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.