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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:22:43+00:00 2026-06-18T10:22:43+00:00

Hia guys, I’m currently learning to use HighCharts in order to graph some data.

  • 0

Hia guys,

I’m currently learning to use HighCharts in order to graph some data.

After learning to set up on a local page, it was time to load the data dynamically / though ajax.

The chart loads fine, with series defined like:

var series1=[];
var series2=[];
var series3=[];

I then have a button, which fires an ajax request, and these arrays are filled with data, pulled from an sql database, formatted, and sent back to the webpage 😀
(this has taken a while)

Now – with these arrays filled, I’m looking to get HighCharts to draw this data.

I’ve tried to use chart.refresh(); on the end of my ajax but this seems to give the error:

Uncaught TypeError: Object #<Object> has no method 'refresh'

I’m a little stumped and struggling to make progress – a nudge in the right direction would be very much appreciated!

Edit:

chart.series[0].setData(series1);

Is what needs firing after the arrays have been filled up.

  • 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-18T10:22:44+00:00Added an answer on June 18, 2026 at 10:22 am

    Without seeing the rest of your code here is a wild guess:
    You have set up your chart with these 3 series already “created” in the HighCharts options. You are loading the page, defining your HighCharts options (including the 3 series – as empty series), then firing the ajax call to populate the three series of data.

    You are not actually pushing the new data in each series to the chart, however. You are just setting the vars to new values after they have been sent to HighCharts – refreshing (if even a valid HighCharts call) HighCharts does “nothing” because it is not re-reading the 3 var values.

    Also, note that chart.refresh does not appear to be a valid HighCharts call. There is chart.redraw that you can try – but I do not think this will help in your case because of how you are defining your data series elements (again, no idea because the important part – telling HighCharts there is new data in code was not presented). Have a look at the API as well for pointers on dynamically assigning data.

    How are you updating the series values? How are you telling the chart there is new data? It would be helpful to see the rest of the code because 3 lines of var x=[] is not really useful.

    Here is a basic way to set the data of a series using setData:

    $('#button').click(function() {
        chart.series[0].setData([129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4] );
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hia guys, I'm trying to set up some cascading dropdowns to filter data within
Hia guys, I'm helping out a friend with some code and so am trying
Hia, I'm trying to set up a graph as shown in this fiddle: http://jsfiddle.net/tXz73/
Hia. I am using some round rect buttons with own images for their states.
Hia experts! Last time i was scrolling down the interwebs, i found an appealing
Hia, I have just made the code: <?php $ur = $user['Skin']; $filename = "img/Skins/"
Hi a server with a PHP script that deals with image downloads. After it
I want to sort a data frame by multiple columns. For example, with the
Hia, got a one to many relation for chars and items. one char can
Hia, I'm looking for a way to play a movie as background in portray

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.