KavaChart in Action - Examples and Documentation - AlaCarte

[ Back ] Basic Applet Collection - Simple Live Data Samples

One of the primary advantages to using applets over server side technology is the built-in ability to do dynamic data updates. All KavaChart applets can read data from a URL periodically to update their data.  
 

This bar chart reads data from two different URLs. In our case the URLs are simply text files on your filesystem, "foo.dat", and "bar.dat".

Generally, your applet will read data from a cgi-bin script, an ASP, a JSP or some other server-side mechanism that provides a view of database information. The stream returned by that script should be like the information in these files.

Because our "networkInterval" param is set to "20", the applet re-reads these files every 20 seconds and replaces the chart data with data from the files.

Make a change to one of these files to see the change reflected on the chart.

You'll also notice that the KavaChart version is displayed as the chart title. This happens when you set the "showVersion" param to "true".

 

This chart reads data from the file "block.dat". Data for all datasets is in the same file, one series per row.

Other URL params are available to read both X and Y data from URLs. Most time oriented charts read URL data from a URL named in "customDatasetHandler".

By making changes to "block.dat", you'll see the chart automatically update to reflect your data.

 

Another chart that reads data from "block.dat". Since both this applet and the previous definition read data from the same page, you'll see both applets update when you make changes to "block.dat".

URL data sources provide a convenient way to animate your pages with real time data updates.