This is a modified version of one of the heatmap demos, which uses dataClasses for the colorAxis. There are two issues here:
1. When you click a legend item you get an "Uncaught TypeError: undefined is not a function "
2. There does not appear to be any way to override the legendItemClick event