O'Reilly logo

Highcharts Cookbook by Nicholas Terwoord

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using AJAX for polling charts

We have made static charts so far. Often, we'll want to update charts periodically to represent changes in the data over time. The best way to do that is using AJAX.

Getting ready

To set up a basic page and install jQuery and Highcharts, refer to the Getting ready section of the Creating your first chart recipe in Chapter 1, Getting Started with Highcharts.

If you already have a server set up or will be setting up your own, many of the following steps can be omitted:

  1. Download Python 2.7 from http://www.python.org/download and install it.
  2. Download pip from http://www.pip-installer.org/en/latest/installing.html and install it.
  3. Run the following command to install Bottle:
    pip install bottle==0.11.6
  4. Create a bottle_server.py ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required