I made a bar chart with the Flot library, and used the flot-tooltip plugin to create the tooltips. Alas, while all the tooltip values should be integers, they appear as floats. At first I tried to use parseInt
on the actual data passed to Flot, but it didn't help.
Next I tried to use an external function to customize the content of the tooltip, like here: How to set x axis value as tooltip in flot charts textual data
However, the result was an error:
Uncaught TypeError: content.replace is not a function
And after updating flot-tooltip, it changed to:
Uncaught TypeError: a.replace is not a function
I'm using Flot 0.8.3
Did I forget to include some library, or confused the order the scripts should go in? (that can usually generate such errors). Is there another way to force the tooltip values to be integers?