Your code is trying to hide the whole legend, not an area in the chart based on a click in a legend.
Trying looking at this code: http://jsfiddle.net/asgallant/6gz2Q - you basically need to create your chart in a specific way and add an on select listener to catch the event when the legend is clicked:
google.visualization.events.addListener(chart, 'select', function(){
...
});
Please note, the code in the example link is not mine, but it helped me with the same exact problem.