我有一个带有图例的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' }
}
);
});
Run Code Online (Sandbox Code Playgroud)