flot.tooltip

Customize tooltip in FLOT graph

空扰寡人 提交于 2019-12-08 09:31:33
问题 I am using FLOT to display graphs. To display tootip i am using https://github.com/krzysu/flot.tooltip. Now I want to customize content of tooltip so I am using callback to set content of tooltip. Code snippet: tooltip: true, tooltipOpts: { content: function(label, xval, yval, flotItem){ var xAxis = plot.getXAxes(); return xval; }, defaultTheme: false } But its giving me error caught TypeError: Object function (label, xval, yval, flotItem){ var xAxis = plot.getXAxes(); return xval; } has no

Customize tooltip in FLOT graph

点点圈 提交于 2019-12-06 16:41:17
I am using FLOT to display graphs. To display tootip i am using https://github.com/krzysu/flot.tooltip . Now I want to customize content of tooltip so I am using callback to set content of tooltip. Code snippet: tooltip: true, tooltipOpts: { content: function(label, xval, yval, flotItem){ var xAxis = plot.getXAxes(); return xval; }, defaultTheme: false } But its giving me error caught TypeError: Object function (label, xval, yval, flotItem){ var xAxis = plot.getXAxes(); return xval; } has no method 'replace' Could any one help me ? Thanks in advance. I'm not using the flot tooltip. There is