This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* In working with bubble charts, I've regularly had to work out the math to size the | |
area of the bubbles correctly. It's a common mistake and criticism of bubble charts, | |
when values determine the radius of the bubble rather than the area. | |
Here's a simple function to do it for you! | |
*/ | |
// This is the maximum value of the data attribute you wish to map as bubbles | |
var maxvalue = 70000; | |
// This is your desired maximum radius |