KavaChart in Action - Examples and Documentation - AlaCarte

[ Back ] Specialty Applet Collection - Gauges & Speedometers

Gauges are typically used to measure one or two items. For example, a speedometer in a car displays only the car's speed. However, the other elements in a gauge provide hints about what the appropriate values should be.

KavaChart AlaCarte's specialty applet collection includes the applet "com.ve.kavachart.applet.speedoApp" for drawing gauges.

Typically, a gauge shows a "normal" value near the middle of the gauge, and uses indicators like colored regions to display danger zones.

A gauge shows an instant status, and isn't particularly helpful in explaining trends or comparisons.

KavaChart gauges are implemented with "speedoApp", which uses a single axis to display a range of values, and one indicator per dataset to show the current value. The available indicators include lines, pointers, and sweep arcs. All KavaChart gauges use a curved axis to display values.

 

A simple speedo definition uses dataset values that define the total range of possible data. The first value in the dataset is used to locate the speedo's indicator needle.

Another approach supplies only one value for data, and then uses "yAxisStart" and "yAxisEnd" values to define the axis limits.

 

By adding "thresholdLine" params, the applet will paint regions to indicate various threshold levels.

A "needleStyle" param changes the needle from an arrow to a pointer, and "dataset0Color" sets the color to black.

 

The "speedoPostion" param changes the speedo to various locations and positions. Position "2" changes the indicator to a top-centered dial. Other indicators create a quarter-circle indicator centered in various locations, or a near full-circle indicator.

 

One of the significant advantages of using KavaChart applets is the ability to read data from a URL, which provides near real-time data updates. The applet reads information from "dataset0yURL" every "networkInterval" to get updates. Since we don't know if this demo is running from a server or not, we supply simulated observations by using the URL "fake".

 

Use KavaChart's ChartWizard to experiment with different speedo designs. You'll generally be able to find a variant that suits your needs.