public/assets/js/application.js
// calculate r of each item so that area scales to value

calculate r of each item so that area scales to value
calculate r of each item so that area scales to value
function rCalculation (data) {
		var i, rVals = [];
		for (i = 0; i < data.length; i += 1) {
			rVals.push(Math.sqrt(data[i].value / Math.PI)*2);
		}
		return rVals;
	}
function rCalculation ( data ) { var i , rVals = [ ] ; for ( i = 0 ; i < data . length ; i += 1 ) { rVals . push ( Math . sqrt ( data [ i ] . value / Math . PI ) * 2 ) ; } return rVals ; }
calculate r of each item so that area scales to value
calculate r of each item so that area scales to value