O'Reilly logo

Ext JS 4 Web Application Development Cookbook by Stuart Ashworth, Andrew Duncan

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

Creating a line chart with updating data

Line charts are one of the most commonly used types of graphs and are most suited to represent trending data, which is often regularly updated and required to be analyzed in real time.

In this recipe, we will look into creating a line chart that polls the server every second to retrieve a new record and plots that new point on the graph.

We will use the scenario of a heart-rate monitor, displaying someone's current heart rate at a specific time after loading the chart.

Getting ready...

We will be using a small PHP script to generate our data and will supply our Ext JS code with a single record on each load. The script accepts a single parameter called currentCount to ensure the SecondsElapsed field is correctly ...

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