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

GLG Graphics Server: AJAX Dials and Meters Demo

Update Interval:
Loading Image...

Servlet's Source Code        Servlet's Image URL

This demo displays a dynamic dial updated with real-time data using a JavaScript timer.

The dial 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 dial image is specified using the width and height parameters of the URL. Click here to display the dial's URL directly to see its parameters.

The dial servlet used by the demo is written in a generic way and may be used to display various types of dials by using the dial_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 three instances of dials in a larger dashboard. The servlet's source code is provided and may be further customized if required.

The value to be displayed in the dial may be provided as the value parameter of the servlet URL. If the value parameter is not specified, the data will be supplied by the servlet from a datasource on the server side. The "Label:" entry field demonstrates how to supply servlet parameters for the dial from HTML.

The demo uses a few pre-built dials from the Dials and Meters palette provided with the controls widget set. The dials' drawings may be customized using the GLG Graphics Builder. Custom dials may be built from scratch using the Graphics Builder as well.

The dial servlet loads dial 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