pa7/heatmap.js — pull request #68 by Danielku15 (2013-07-16 12:02:09+00:00)
Title: Blur radius configuration and alpha channel support for gradient setup

I created some minor improvements to heatmap.js I had some weird problems using weighted points in the heatmap so I decided to dig a bit deeper.

The fixed blur radius of 15px is not always the best choice for presenting the data. I added a configuration property to adjust this value.

In addition the alpha channel calculation of the final heatmap is very strange. You just copy the alpha channel of the grayscale/alpha image you create. This will cause small / low weighted points to disappear instead of being displayed blue. I changed heatmap.js to use the alpha value provided by the gradient setup, this delivers way better results. Especially if you combine the alpha channel with a customized blur radius.

Here is a small example how the improvement looks like.

Improved Version: http://jsfiddle.net/RGU5w/1/
Same Sample using the current version: http://jsfiddle.net/JGfmC/

Plus there is a custom heatmap calculation/drawing I made to visualize the expected results. Of course using the native shadow feature has a better performance than custom blurring so I decided to contribute this adjustments to your library.