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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:45:49+00:00 2026-06-15T18:45:49+00:00

I am creating a javascript based html dashboard. In order to refresh the values

  • 0

I am creating a javascript based html dashboard. In order to refresh the values in the dashboard charts I have written the following code:

var chart, options;

function loadDynamicData() {            
    var data = window.parent.getDynamicData();
    var dataArray = data.split(',');

    for(var i = 0; i < chartData.length; i++) {
        chartData[i].data.pop();
        chartData[i].data.push(parseInt(dataArray[i],10));
    }
}

$(document).ready(function() {
    //initialize options here
    setInterval(function () {
        loadDynamicValues(); // loads dynamic values through ajax
                             // and updates options
        chart = new Highcharts.Chart(options);
    }, 300000);
});

But the problem is when I run this in the browser for a long time (about 1 hour), the memory being used goes up and the browser becomes unresponsive. If I remove the setInterval() method and run the code that is inside for once, then there is no problem.

What can be the problem here?

  • 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-15T18:45:50+00:00Added an answer on June 15, 2026 at 6:45 pm

    Please do a chart.destroy() before creating new chart.

    if (chart) chart.destroy;

    Here is a link for test. http://www.highcharts.com/tests/?file=memory-chart-destroy

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

Sidebar

Related Questions

I am workign creating a form wizard based on JSON data. I have created
I'm creating a Drupal form with a datetime-based javascript popup calendar input that allows
I'm creating a product customizer with HTML, CSS and Javascript, and I've set up
I am creating a slideshow using jquery based on the code given here -
I'm creating PHP, Javascript based photo-gallery from scratch The problem is, I want to
I'm creating a JavaScript based calendar control, which when showing a single day needs
I have a site that is heavily based on javascript, but I still want
I'm creating a web based application (i.e. JavaScript with jQuery and lots of SVG)
I am dynamically creating a html table based on the JSON response from an
I'm working on a project currently and have written the entire page in Javascript.

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.