gaussian-function d3js, compute normal distribution for random var you can find it there as well https://github.com/mbostock/d3/wiki/Gallery