krzysu / flot.tooltip

tooltip plugin for wonderful Flot plotting library
https://github.com/krzysu/flot.tooltip
187 stars 153 forks source link

Error: item.series.xaxis[ticks][tickIndex].label.replace is not a function #148

Open maplelinyuan opened 7 years ago

maplelinyuan commented 7 years ago

when the ticks of xaxis is consisted of a array with number, like[0,1,2,3...], it shows the error. I temporarily choose to change content = content.replace(xPattern, item.series.xaxis[ticks][tickIndex].label.replace(/\$/g, '$$$$')); to content = content.replace(xPattern, String(item.series.xaxis[ticks][tickIndex].label).replace(/\$/g, '$$$$'));

Ardyey commented 4 years ago

Can confirm that this fixes the issue.