Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Post
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Reply
How to make donut chart clickable
Venkatesh K H
7 years ago
186
Reply
I want to make donut chart clickable. If i click on one slice it should take towards next page(like url(a href).
I have tried this code but it doesnt work for donuts chart.
I have tried to code. but this is only for highlight bar.
Highcharts.chart('container', {
chart: {
type: 'column'
},
title: {
text: 'Click points to go to URL'
},
xAxis: {
type: 'category'
},
plotOptions: {
series: {
cursor: 'pointer',
point: {
events: {
click: function () {
location.href = 'https://en.wikipedia.org/wiki/' +
this.options.key;
}
}
}
}
},
series: [{
data: [{
y: 29.9,
name: 'USA',
key: 'United_States'
}, {
y: 71.5,
name: 'Canada',
key: 'Canada'
}, {
y: 106.4,
name: 'Mexico',
key: 'Mexico'
}]
}]
});
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How to show a color picker inside a bootstrap modal?
What is the use of blur function in JavaScript?