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

  • Home
  • SEARCH
  • 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 7627515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:28:11+00:00 2026-05-31T05:28:11+00:00

I am trying to create a chart builder. I have a user inputs for

  • 0

I am trying to create a chart builder. I have a user inputs for Title and location of the legend. I want a user to type in a title and when the click off (blur) the chart to be updated with what they typed.

The problem is the chart renders the first time, however i can never get the char to render again. Here is a quick summary of the code.

$('#legendlocation-select').blur(function updateChartLegend(){
console.log($('#legendlocation-select').val());
if($('#legendlocation-select').val()==='none'){
    chartData.legend.enabled = 'false';
}else{
    chartData.legend.enabled = 'true';
    chartData.legend.align = $('#legendlocation-select').val();
}
renderChart();
});
function renderChart(){
if(chart == undefined){
    console.log("First Draw");
    chart = new Highcharts.Chart(chartData);
}else{
    console.log("Redraw");
    chart.destroy();
    chart = new Highcharts.Chart(chartData);
    chart.redraw();
}
};

The chart renders the first time and then is just a blank white area the second time. Any ideas?
chartData is a variable with all the options in it that renders correctly.

here is a JSFiddle that shows the issue http://jsfiddle.net/zVjrb/3/

  • 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-05-31T05:28:12+00:00Added an answer on May 31, 2026 at 5:28 am

    Figured out the Issue. Detailed here: http://highslide.com/forum/viewtopic.php?f=12&t=15255

    Basically the Highcharts.charts function clears the series data from the original options object.

    This is my working code:

    var chart;
    var chartData = { /* you chart data goes here */ };
    $('#legendlocation-select').blur(function updateChartLegend(){
      console.log($('#legendlocation-select').val());
      if($('#legendlocation-select').val()==='none'){
        chart.options.legend.enabled = false;
      }else{
        chart.options.legend.enabled = true;
        chart.options.legend.align = $('#legendlocation-select').val();
      }
      renderChart();
    });
    
    function renderChart(){
      //console.log(chartData);
      if(chart == undefined){
        console.log("First Draw");
        chart = new Highcharts.Chart(chartData);
      }else{
        console.log("Redraw");
        chart.options.chart.animation = false;
        chart = new Highcharts.Chart(chart.options);
        chart.render();
      }
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a chat box for my game. The user type's their
So I am trying to create a chart in Microsoft Access. I have my
Im trying to create some chart images without ever displaying those charts on the
I am trying to create a column chart that renders a linear gradient which
I am trying to create horizontal bar chart to look like a pill chart.
I am trying to create a Stacked Bar Chart. My requirement is I need
I am trying to create a stacked column chart in VBA where there is
I'm trying to create a chart for my website. It will be a simple
Does anyone have any idea how to create a logarithmic chart in FLOT? Basically
I am trying to create a pie chart and am customizing the example here:

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.