【发布时间】:2014-11-07 20:25:50
【问题描述】:
我有一个带有图例的 jqplot 饼图,当鼠标悬停在饼图上时,我想让图例文本显示为工具提示。我不知道该怎么做。有没有人做过类似的经历?
示例代码:
$(document).ready(function(){
var data = [['Heavy Industry', 12],['Retail', 9], ['Light Industry', 14],['Out of home', 16],['Commuting', 7], ['Orientation', 9]];
var plot1 = jQuery.jqplot ('chart1', [data],
{
seriesDefaults: {
renderer: jQuery.jqplot.PieRenderer,
rendererOptions: {
showDataLabels: true
}
},
legend: { show:true, location: 'e' }
}
);
});
【问题讨论】:
标签: javascript jquery charts tooltip jqplot