Fix for Bar. It was trying to execute on all elements is the page

I was using bar to show my data. Every time i moved my mouse pointer, it tried to execute the code and then gived an error since the other elementes of the page doesnt have the same behavior.

Let me know if it is not good, or if i could do this check somewhere. I didnt wrote specs since i didnt know how to test it. =s