Javascript 图例中的jqplot链接
我有一个用jqplot制作的基本饼图:Javascript 图例中的jqplot链接,javascript,jquery,hyperlink,jqplot,pie-chart,Javascript,Jquery,Hyperlink,Jqplot,Pie Chart,我有一个用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], {
$(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' }
}
);
});
现在我想在图例中添加链接。这可能吗?如果可能,如何实现?您可以将HTML放入标签中:
$.jqplot(..., {
series : {
...
label : "<a href='URL'>click me</a>"
}
});
此外,我注意到一些设置(如启用缩放)会阻止标签的可点击性。您可以将HTML放入标签中:
$.jqplot(..., {
series : {
...
label : "<a href='URL'>click me</a>"
}
});
//I used the below method to bring hyperlink on legends, it worked for me. I did the same thing for bar chart also.
此外,我注意到一些设置(如启用缩放)会阻止标签的可点击性
//I used the below method to bring hyperlink on legends, it worked for me. I did the same thing for bar chart also.
这是我用来构成数组的字符串
strArr=“[”,8561]”
这是我用来构成数组的字符串
strArr=“[”,8561]”
我尝试添加
z-index:1000
至td.jqplot表图例
或td.jqplot-table-图例a
,但两者均不起作用。有什么想法吗?或者这是不可能的?试试table.jqplot table legend
(或者只留下元素名,只使用类)至td.jqplot表图例
或td.jqplot-table-图例a
,但两者均不起作用。有什么想法吗?或者这是不可能的?请尝试table.jqplot table legend
(或者只保留元素名称,只使用类)。