Bubble Chart implementation in JavaScript and D3.js
JavaScript CSS HTML
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 34 commits ahead of vlandham:gh-pages.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
TODO - add legend.jpeg
bubble demo.gif


Animated Bubble Charts

Create animated bubble charts using D3.js.

Demo available here.

Based directly on Jim Vallandingham's work in this repo and described at his blog.

Changes in this fork:


D3 needs to be run from a webserver due to how it imports data files.

See more here: https://github.com/mbostock/d3/wiki#using

So, to run this visualization locally, from the Terminal, navigate to the directory you checked it out to

cd ~/code/path/to/bubble_chart

Then start a webserver locally. If you have Python installed, you should be able to use Python's built-in webserver:

python -m http.server 8888

** Node.js http-server

Alternatively, you can try using node's http-server for local hosting:

Ensure you have the node package installed:

npm install -g http-server

And then run it in the root directory of the repository.



Bubbles might not be the answer to your problems

While the bubbles are flashy and are fun to watch move around, they may not be the best visual form to display your information in. In most cases, when bubbles are used to encode a single variable, the two dimensional bubble inflates and obscures the one dimensional value it is attempting to display.

Kaiser Fung hates bubble charts. You can see lots of reasons why here: http://junkcharts.typepad.com/junk_charts/bubble_chart/

Just keep in mind when you are working with your data: Bubbles aren't always the answer.