Tag: flot.tooltip

在FLOT图中自定义工具提示

我正在使用FLOT来显示图表。 要显示tootip我正在使用https://github.com/krzysu/flot.tooltip 。 现在我想自定义工具提示的内容,所以我使用回调来设置工具提示的内容。 代码段: tooltip: true, tooltipOpts: { content: function(label, xval, yval, flotItem){ var xAxis = plot.getXAxes(); return xval; }, defaultTheme: false } 但它给了我错误 caught TypeError: Object function (label, xval, yval, flotItem){ var xAxis = plot.getXAxes(); return xval; } has no method ‘replace’ 任何人都可以帮助我吗? 提前致谢。