Home | AJAX Demos | Java Demos | AJAX Graphics Server | Products

GLG Graphics Server: AJAX Real-Time Graph Demo

Update Interval:
Loading Image...

Label:
Servlet's Source Code        Servlet's Image URL

This demo displays a dynamic graph that is updated with a real-time data using a JavaScript timer.

The graph image of the requested size is generated on the server side using the GLG Graphics Server in the form of a servlet. The size of the graph image is specified using the width and height parameters of the URL. Click here to display the graph's URL directly to see its parameters.

The graph servlet used by the demo is written in a generic way and may be used to display various types of graphs by using the graph_type URL parameter. Since the servlet is self-contained, it may be used as a component on multiple web pages. For example, the AJAX Dashboard Demo uses the servlet to render an instance of this graph in a larger dashboard. The servlet's source code is provided and may be further customized if required.

The data displayed in the graph is supplied by the servlet from a datasource on the server side. The "Label:" entry field demonstrates how to supply servlet parameters for the graph from HTML.

The demo uses a few pre-built graphs from the graph palette provided with the 2D Graphs widget set. The GLG Graphics Builder may be used to customize the graphs' drawings, as well as add custom labels and annotations to the graph.

The graph servlet loads graph drawings just once and reuses them between all servlet instances and threads. This reduces consumption of the JVM heap space, increases the speed of image generation and decreases the server load.


Home | AJAX Demos | Java Demos | AJAX Graphics Server | Products