Reputation: 41
I'm trying to create a highchart with each project has own url(clickable), for each data inside tooltip.
series: [{
tooltip: {
pointFormatter: function() {
var string = '';
Highcharts.each(toolTip[this.series.data.indexOf(this)], function(p) {
string += '<a href="'+ urls +'">' + p + '</a><br>'
});
return string + "<br />";
}
},
type: 'spline',
data: data
}]
How can I set each project get own url from urls
?
Upvotes: 0
Views: 76
Reputation: 10075
I updated series used urls[indexs][j]
instead of urls
series: [{
tooltip: {
pointFormatter: function() {
var string = '';
var indexs = this.series.data.indexOf(this);
Highcharts.each(toolTip[this.series.data.indexOf(this)], function(p, j) {
string += '<a href="' + urls[indexs][j] + '">' + p + '</a><br>'
});
return string + "<br />";
}
},
type: 'spline',
data: data
}]
Fiddle demo
Upvotes: 2