我有一個帶有圖例的jqplot餅圖,我希望在鼠標懸停在餅上時將圖例文本顯示爲工具提示。我不知道該怎麼做。有沒有人有類似的經驗?如何在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' }
}
);
});
感謝LOT:D – Anant
謝謝Koby。問候,安納什 –
當從一部分的餡餅傳遞到另一部分時,你不工作,當你出門 – coorasse