Bug fix to python defined tooltip. 

When a key in python_defined_tooltip is passed as a float but the value is an integer like 8.0 or 999.0, javascript converts autotically to integer and then when searching for the key it is not found.

Now, the python keys in the dict are converted to integers when is needed in order to avoid the confusion with javascript.