2013-04-05 48 views
6

所以,我對於我的海軍報圖上醒目的點擊事件jQuery的方法:獲得點擊標籤,jQuery的海軍報「plotclick」事件

$("#placeholder").bind("plotclick", function (event, pos, item) { 
    alert("clicked"); 
}); 

我知道,從項目的點擊值[「數據點」]數組。但我在哪裏可以找到我點擊的曲線標籤?

謝謝。

回答

7

item.series.label

$("#placeholder").bind("plotclick", function (event, pos, item) { 
    if (item) { 
     alert(item.series.label); 
    } 
}); 

小提琴here