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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:08:06+00:00 2026-05-23T21:08:06+00:00

I have a website which serves around 20 – 50 widgets per second and

  • 0

I have a website which serves around 20 – 50 widgets per second and I wanted to create a chart that automatically gets data from the server and then updates the chart and I want the chart to run from right to left as more data is added and remove the old values and add the new values. I would like a javascript and php solution.

I have tried google and cannot find any solutions for this and I found a tutorial once but now I have lost that link 🙁 So any kind of help in form of a link, piece of code or what to look for will help.

One thing that I wanted was having the widget start with a delay of fetch data but start displaying the data after 5 seconds of the intial fetch and then fetch data every 2 seconds, however load data second by second. This would ease the load on the server while also generating smooth graphs.

enter image description here

Any help would be appreciated….

Something Like this for php
http://support.nevron.com/KB/a175/implement-real-time-chart-in-aspnet-application-using-ajax.aspx

  • 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-23T21:08:06+00:00Added an answer on May 23, 2026 at 9:08 pm

    So you just need two functions running at different intervals that have access to the same variable where all the data will be stored

    function runChart() {
      var dataObject = [];
    
      fetchFromServer = function() {
        //Make your Ajax call here
        //and then update 'dataObject'
      }
    
      //set fetchFromServer to fire every 5 seconds
      setInterval( function () { fetchFromServer() }, 5000 ); 
    
      loadToChart = function() {
        //In here keep track of what was the last data you added to the chart
        //pull data-points from 'dataObject' 
        //and display the next data-point on the graph
      }
      //set loadToChart to fire every second
      setInterval( function () { loadToChart() } ,1000); 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website which uses PHP and HTML pages, I want to create
I have a table which contains around 400 000 records and which gets called
I'm currently have around 100 rows in a table on my website, which include
I have around 3 websites residing in a server which is being shared with
I have a website which works with PHP on the server side. Users access
I have website on the server, which is not precompiled (with source code, so
I have deployed a website in my server, how i know which what my
I have some website which requires a logon and shows sensitive information. The person
I have a website which uses the custom 404 error handling in PHP/Apache to
I have a website which uses TinyMCE textboxes for editing. It works fine except

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.