我将如何修改演示图表“带有向下钻取的列”,以便向下钻取图表中的列是指向任意网页(而不是另一个向下钻取)的超链接?
问问题
1493 次
1 回答
0
If you do not add a url property to your initial series it will not click to the url. So, add the url
property to your drilldown items and add the click event handler to it. See this example. The url does not load because of jsFiddle but it should work in general.
Code that is important:
$.each(versions, function (key, value) {
drilldownSeries.push({
name: key,
id: key,
data: value,
url: 'http://bing.com/search?q=foo'
});
});
And:
plotOptions: {
series: {
borderWidth: 0,
dataLabels: {
enabled: true,
format: '{point.y:.1f}%'
},
point: {
events: {
click: function () {
location.href = this.options.url;
}
}
}
}
}
于 2014-02-19T18:29:07.043 回答