jqPlot饼图工具提示 [英] jqPlot Pie Chart Tooltips
问题描述
我是否正确地认为jqPlot中的Hightlighter类不能处理PieRenderer的工具提示?我花了很长时间尝试使它们工作,但似乎无法显示工具提示.
Am I right in thinking that the Hightlighter class in jqPlot does not handle tooltips for the PieRenderer? I've spent quite a while trying to get them to work however I can't seem to get it to show the tooltip.
如果我是对的,是否可以处理段的翻转并将数据传递给第三方jQuery工具提示?
If I am right, is there a way to handle the rollover of a segment and pass the data to a third party jQuery tooltip?
谢谢.
推荐答案
浏览 jqplot的问题,似乎对此功能有一些要求,但尚未实现.
Looking through the issues for jqplot, it would seem that there have been a few requests for this functionality, but it has not yet been implemented.
基于此问题如何在jqplot饼图上显示工具提示,则可以连接jqplotDataHighlight
和jqplotDataUnhighlight
事件:
Based on this question How to display tooltips on jqplot pie chart, you could wire up the jqplotDataHighlight
and jqplotDataUnhighlight
events:
$("#chartId").bind('jqplotDataHighlight', function(ev, seriesIndex, pointIndex, data) {
});
$("#chartId").bind('jqplotDataUnhighlight', function(ev, seriesIndex, pointIndex, data) {
});
使用此技术创建自定义工具提示是一个很好的例子,此处.尽管它正在处理气泡图,但它应该为您指明正确的方向.
There is a good example of using this technique to create custom tooltips here. Although it is dealing with bubble charts, it should point you in the right direction.
您还可以尝试使用 jqplot-highlighter 插件,该插件可提供饼图的工具提示
You could also try out the jqplot-highlighter plugin, which allows tooltips for pie charts.
这篇关于jqPlot饼图工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!