Hi I was wondering how to make the title in highcharts a link so that it would work with bootstrap's popover functionality. Here is a fiddle
/
$(function () {
$('#container').highcharts({
chart: {},
title: {
text: 'Sales Funnel ' + '<a style="font-size:12px" id="popoverFunnel" data-toggle="popover" title="hello" data-content="hellooo">Hello</a>'
},
xAxis: {
minPadding: 0.05,
maxPadding: 0.05
},
series: [{
data: [{
x: 0,
y: 29.9,
url: ''
}, {
x: 1,
y: 71.5,
url: ''
}]
}],
plotOptions: {
series: {
cursor: 'pointer',
point: {
events: {
click: function () {
var url = this.options.url;
window.open(url);
}
}
},
}
},
});
});
$('document').ready(function () {
$('#popoverFunnel').popover();
});
Thank you James
Hi I was wondering how to make the title in highcharts a link so that it would work with bootstrap's popover functionality. Here is a fiddle
http://jsfiddle/287JP/4/
$(function () {
$('#container').highcharts({
chart: {},
title: {
text: 'Sales Funnel ' + '<a style="font-size:12px" id="popoverFunnel" data-toggle="popover" title="hello" data-content="hellooo">Hello</a>'
},
xAxis: {
minPadding: 0.05,
maxPadding: 0.05
},
series: [{
data: [{
x: 0,
y: 29.9,
url: 'http://www.google.'
}, {
x: 1,
y: 71.5,
url: 'http://www.yahoo.'
}]
}],
plotOptions: {
series: {
cursor: 'pointer',
point: {
events: {
click: function () {
var url = this.options.url;
window.open(url);
}
}
},
}
},
});
});
$('document').ready(function () {
$('#popoverFunnel').popover();
});
Thank you James
Share Improve this question edited Apr 1, 2014 at 22:12 James asked Apr 1, 2014 at 22:05 JamesJames 5571 gold badge12 silver badges31 bronze badges2 Answers
Reset to default 4Set title.useHTML = true
, see: http://jsfiddle/287JP/5/
$('#container').highcharts({
title: {
useHTML: true,
text: 'Sales Funnel ' + '<a style="font-size:12px" id="popoverFunnel" data-toggle="popover" title="hello" data-content="hellooo">Hello</a>'
},
...
});
I took your example and made it work with Bootstrap. See http://jsfiddle/key2xanadu/zfsfz0c9/.
The solution involves ID tagging the puppies and then tooltipping them at the bottom:
$('document').ready(function () {
$("#text_title").tooltip({placement: 'bottom', title:"HELLO TITLE!"});
$("#label_one").tooltip({placement: 'bottom', title:"HELLO ONE!"});
$("#label_two").tooltip({placement: 'bottom', title:"HELLO TWO!"});
});
Example also shows how to add tooltips to the x-axis labels!