KavaChart in Action - Examples and Documentation - AlaCarte

[ Back ] Basic Applet Collection - JavaScript Controlled Samples

One of the really nice features of KavaChart's AlaCarte applets is their ability to be controlled via JavaScript. You can build a single page AJAX-style application with chart applets that are controlled completely by the page's JavaScript.  
 

To show you how this works, we'll start with a simple bar chart applet:

The applet must include the "MAYSCRIPT" directive, and should have a name. In our case, we called our chart "chart1".

	<applet 
		MAYSCRIPT
		name="chart1"
		code="com.ve.kavachart.applet.columnApp" 
		...
	</applet>
	

To start, we'll change the bars from a single color to individual colors, one per bar.

Click here to make the change.

Next, we'll change the title of the chart:

Click here to make the change.

Now, let's start a thread that updates the data with random numbers every second.

Click here to start the thread.
Click here to stop the thread.
Click here to add gridlines.
Click here to remove gridlines.
Click here to add a reference line.
Click here to make the chart 3-D.

Although these are very simple examples of what you can do, the possibilities are limitless. You can append new data items as they arrive, replace existing data, override any chart PARAM to control labelling, titles, colors, and so on. Combine a collection of applets into an AJAX dashboard. Create a page that performs real-time process monitoring.