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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:37:32+00:00 2026-06-14T08:37:32+00:00

I am using a line chart (Highcharts) for displaying forecast data which is fed

  • 0

I am using a line chart (Highcharts) for displaying forecast data which is fed dynamically every second.
However I want to display only 48 data in each series. I can easily add new points to series but couldn’t find a way to remove the first element in the series after adding the new element.

setInterval(function () {
  $.get("cross/forecast", { numOfData: 1 }, (function (chart) {
    return function (data) {
      console.log(data);
      var d = jQuery.parseJSON(data);
      // I NEED TO REMOVE FIRST ELEMENTS IN EACH SERIES
      //... something like chart.series[0].removePoint(0,true)
      for (var i = 0; i < d.length; i++) {
        chart.series[0].addPoint(d[i][0], true);
        chart.series[1].addPoint(d[i][1], true);
        chart.series[2].addPoint(d[i][2], true);
      }
    };
  })(chart), "text");
}, 1000);
  • 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-14T08:37:33+00:00Added an answer on June 14, 2026 at 8:37 am

    Almost … try :

    chart.series[0].data[0].remove();
    

    To remove the first point (data is an array, arrays are 0 based)… Working example here

    If you wanted to add an if statement around your removal you could check the number of points in the series using something like this :

    if (chart.series[0].data.length >= 49) {
      chart.series[0].data[0].remove();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to produce a line chart using Flot, but I want the data
I want to create a Line Chart using data received by Google Analytics API.
I want to create a line chart using 2 set of values.First value (i.e
I'm using Visifire. I have plotted about 500+ points on a line chart. However,
I am using a dojo column chart. I want to add a custom line
I need some help. I want to create a dynamic line chart using Google's
I'm using the AChartEngine library to display a line chart in my app. Unfortunately
I'm new at using HighCharts in javascript. I'm doing a line chart, but the
how can i create dynamic line chart using jFree chart in java which is
I'm using Time data with irregular intervals chart of Highcharts. As you know when

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.