Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8365721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:43:38+00:00 2026-06-09T12:43:38+00:00

All, I’m using HighCharts in a web app I’m working on, and generally, I

  • 0

All,

I’m using HighCharts in a web app I’m working on, and generally, I like it very much.

However, I’m having a hard time figuring out how capture a mouse click on the ENTIRE chart.

In other words – I’d like to know when the user clicks ANYWHERE on the chart (e.g., the plot area, the title, the x- or y-axis, the margins and padding around the chart elements, etc.)

Or, I’d like to disable events altogether, so I can trap the event in the container itself.

More detailed version…

I have a DIV that contains my HighChart.

I want to know if the user clicks ANYWHERE within that DIV.

So – initially I tried attaching an “onclick” event to the DIV, but that never gets fired, presumably because the click is getting trapped by the HighChart.

So, in the code that sets up the HighChart, I added this:

var chart = new Highcharts.Chart({
    chart: {
        renderTo: "container",
        events: {
            click: function(event) {
                // do something
            }
        },
        ...
    }
    ...
});

This works OK IF the user clicks somewhere within the plot area, but not if she clicks anywhere else in the chart (e.g., the x-axis, the y-axis, the title, the padding around the chart elements, etc.)

So – how can I make the ENTIRE chart clickable?

Many thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T12:43:40+00:00Added an answer on June 9, 2026 at 12:43 pm

    I had this same issue.

    Using the webkit inspector I can see that Highcharts binds a click event to the chart container (the div with the ‘highcharts-container’ class), and this seems to interfere with clicking.

    Provided you don’t want any of the functionality in that click event, you can remove it by setting

    chart.container.onclick = null;

    Otherwise, you’ll need to use the built-in highcharts event properties to set your callbacks.
    As the OP noted, there is an ‘events’ property for the chart object, which should trigger when clicking the plot background.
    There is also an event property for the plot options which triggers when clicking the series itself.

    For example, for area plots:

    var chart = new Highcharts.Chart({
        ...
        plotOptions: {
            area: {
                events: {
                    click: function(event) {
                        // do something
                    }
                },
            ...
            }
        }
        ...
    });
    

    More more info see:
    http://www.highcharts.com/ref/#plotOptions-area-events

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
All, I'm using wordpress with this and for some reason the eventDrop stopped working.
We're building an app, our first using Rails 3, and we're having to build
All, If I run a query like the following: $qry = Select wrong_column from
all. We're trying to get some intersect collisions working, but the problem experience is
All of a sudden, Facebook sharing has stopped working on my site. It's been
All, I have some script tags that are not working in Wordpress. If I
All, I am building a small site using PHP. In the site, I receive
All, I'm using Facebook Connect (JS SDK) to authenticate a user to my site.
All of a sudden my form link looks like this: <form action=/r.ashx/Models.Module_ContactUs?action=Submit&amp;controller=Contact id=contactUsForm method=post>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.