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 8490031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:59:33+00:00 2026-06-10T21:59:33+00:00

I have created a chart where I’ve added an image. Now when I click

  • 0

I have created a chart where I’ve added an image.
Now when I click this image I want to set the yAxis max to a specific point, and when I click it again to reset the yAxis to the original values.
This is the jsfiddle for it: http://jsfiddle.net/inadcod/TynwP/
I have managed to add the image, to add a click event to the image, but it’s as far as I got.
Can anyone help me out with this? Thanks!

  • 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-10T21:59:35+00:00Added an answer on June 10, 2026 at 9:59 pm

    There are two ways to do what you want.

    First way:

    The problem is that it’s not possible to update chart options and then redraw to get it updated, you have to destroy and then create it again like the following.

    So, for this you can store your chart options into a var and then pass as parameter.

    // inside options
        load: function() {
            this.renderer.image('http://inadcod.com/img/zoom.png', 70, 10, 28, 28)
            .on('click', function() {
                if(options.yAxis.max) {
                    delete options.yAxis.max; // return to default
                } else {
                    options.yAxis.max = 25;
                }
                chart = new Highcharts.Chart(options);                        
            })
            .css({
                cursor: 'pointer',
                position: 'relative',
                "margin-left": "-90px",
                opacity: 0.75
            }).attr({
                id: 'myImage',
                zIndex: -100
            }).add();
        }
    

    Demo

    Second way:

    redraw isn’t called if you just update axis data like the following.
    chart.yAxis[0].max = 25;, that’s why I suggested the way above.
    But if you set chart.yAxis[0].isDisty = true; and call chart.redraw();, it will work. You can see my demo bellow.

    // inside chart options
        load: function() {
            this.renderer.image('http://inadcod.com/img/zoom.png', 70, 10, 28, 28)
            .on('click', function() {
                var axis = chart.yAxis[0];
                axis.max = 25;
                axis.isDirty = true;
                chart.redraw();
            })
            .css({
                cursor: 'pointer',
                position: 'relative',
                "margin-left": "-90px",
                opacity: 0.75
            }).attr({
                id: 'myImage', // your image id
                zIndex: -100
            }).add();
        }
    

    Demo

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

Sidebar

Related Questions

I have an ggplot2 point chart created like this qplot(Index, Popularity ,data = data.slopeone.agg)
I have created a scatter chart using the highcharts Scatter Chart .Now I want
I have created a chart using JFreeChart inside a JSP. I want to render
I have created a chart and converted the chart into an image and displaying
I have a chart created with Birt and I want to add some label
Hy, I have a chart,wich is created in runtime,this could be Line, Bar or
I have created a spread sheet (Example for MSDN) and now I want to
I have created a MS Chart control on my page and added 2 series
I have created a bar chart using google Column Chart , now I have
I have created a line chart using Reporting Services that charts the number of

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.