KavaChart in Action - Examples and Documentation - ProServe

[ Back ] Finance Chart Collection

KavaChart ProServe's collection includes the following simple finance charts:
  • candlestickApp
  • hLOCApp
  • hiLoCloseApp
  • stickApp
  • finComboApp
  • sectorMapApp
KavaChart Enterprise adds specialty charts from the "kcfinance" package for highly customized solutions, and also includes a number of "contrib" charts that create finance-specific combinations that can be zoomed interactively.

Visual Engineering's consulting group has also created customized finance charting applications with full technical analysis, either in interactive Java applets or server-side charting. Contact us at consulting@kavachart.com for more information about how we can save you time and money building a completely customized financial charting solution.

Candlestick charts are used in finance applications to combine a lot of information at a glance. The top and bottom "whiskers" on the candlestick show the high and low value for the day. The open and close values are shown by the center box. Depending on whether the box is solid or hollow, you can tell at a glance whether the opening price was higher or lower than the closing price.
 

This chart uses a simple set of params to create a readable and professional style. Data comes from special params used by candlesticks and OHLC: dataset0HighValues, dataset0LowValues, dataset0OpenValues, and dataset0CloseValues.

You can also read your data from a URL or file, using the "customDatasetHandler" param. The file or stream at this location should contain 5 columns: dates, high, low, open, and close values.

Date values are defined with a timestamp string. Use "inputDateFormat" to describe the format of the string to the server object. In this sample, we're using "yyyy-MM-dd", which is appropriate for our dates, which look like this: "1999-06-01".

Although the data in this sample is fixed, you will probably use a database or web service to provide your data. See our tag library and scriptlet coding examples to see how to do this.

Jun 1, 1999
Close Price:$64.59 Jul 1, 1999
Close Price:$59.82 Aug 2, 1999
Close Price:$65.36 Sep 1, 1999
Close Price:$62.09 Oct 1, 1999
Close Price:$69.49 Nov 1, 1999
Close Price:$73.33 Dec 1, 1999
Close Price:$72.23 Jan 3, 2000
Close Price:$80.06 Feb 1, 2000
Close Price:$76.06 Mar 1, 2000
Close Price:$82.81 Apr 3, 2000
Close Price:$93.62 May 1, 2000
Close Price:$70.63 Jun 1, 2000
Close Price:$58.06 Jul 3, 2000
Close Price:$56.94 Aug 1, 2000
Close Price:$70 Sep 1, 2000
Close Price:$65 Oct 2, 2000
Close Price:$62.12 Nov 1, 2000
Close Price:$49.5 Dec 1, 2000
Close Price:$50.94 Jan 2, 2001
Close Price:$53.7 Feb 1, 2001
Close Price:$53.32 Mar 1, 2001
Close Price:$51.85 Apr 2, 2001
Close Price:$54.32 May 1, 2001
Close Price:$56.9 Jun 1, 2001
Close Price:$64.35 Jul 2, 2001
Close Price:$63.6 Aug 1, 2001
Close Price:$54.75 Sep 4, 2001
Close Price:$42.9 Oct 1, 2001
Close Price:$41.32 Nov 1, 2001
Close Price:$49.7 Dec 3, 2001
Close Price:$48.6 Jan 2, 2002
Close Price:$51.14 Feb 4, 2002
Close Price:$52.98 Mar 1, 2002
Close Price:$60.45 Apr 1, 2002
Close Price:$64.15 May 1, 2002
Close Price:$62.15 Jun 3, 2002
Close Price:$53.45 Jul 1, 2002
Close Price:$46.55 Aug 1, 2002
Close Price:$47.86 Sep 3, 2002
Close Price:$38.9 Oct 1, 2002
Close Price:$33.25 Nov 1, 2002
Close Price:$39.7 Dec 2, 2002
Close Price:$36.86 Jan 2, 2003
Close Price:$36.33 Feb 3, 2003
Close Price:$33.77 Mar 3, 2003
Close Price:$33.62 Apr 1, 2003
Close Price:$36.05 May 1, 2003
Close Price:$35.33 Jun 2, 2003
Close Price:$36 Jul 1, 2003
Close Price:$37.43 Aug 1, 2003
Close Price:$36.56
 

Another variant of this type of chart is the OHLC chart, implemented with hLOCApp. This chart uses a left and right whisker to indicate open and closing prices. Some technical traders like to use the various whisker positions to help them predict price movements.

Like the candlestick chart, an OHLC chart provides a lot of information at a glance: trends, specific period high-low-open-close price data, and volatility for a particular period.

When examining these trends over a long period, a log axis is sometimes appropriate, since investment values compound exponentially. We used a logarithmic axis on this chart, even though it's not really called for by the actual data.

Jun 1, 1999
Close Price:$# Jul 1, 1999
Close Price:$# Aug 2, 1999
Close Price:$# Sep 1, 1999
Close Price:$# Oct 1, 1999
Close Price:$# Nov 1, 1999
Close Price:$# Dec 1, 1999
Close Price:$# Jan 3, 2000
Close Price:$# Feb 1, 2000
Close Price:$# Mar 1, 2000
Close Price:$# Apr 3, 2000
Close Price:$# May 1, 2000
Close Price:$# Jun 1, 2000
Close Price:$# Jul 3, 2000
Close Price:$# Aug 1, 2000
Close Price:$# Sep 1, 2000
Close Price:$# Oct 2, 2000
Close Price:$# Nov 1, 2000
Close Price:$# Dec 1, 2000
Close Price:$# Jan 2, 2001
Close Price:$# Feb 1, 2001
Close Price:$# Mar 1, 2001
Close Price:$# Apr 2, 2001
Close Price:$# May 1, 2001
Close Price:$# Jun 1, 2001
Close Price:$# Jul 2, 2001
Close Price:$# Aug 1, 2001
Close Price:$# Sep 4, 2001
Close Price:$# Oct 1, 2001
Close Price:$# Nov 1, 2001
Close Price:$# Dec 3, 2001
Close Price:$# Jan 2, 2002
Close Price:$# Feb 4, 2002
Close Price:$# Mar 1, 2002
Close Price:$# Apr 1, 2002
Close Price:$# May 1, 2002
Close Price:$# Jun 3, 2002
Close Price:$# Jul 1, 2002
Close Price:$# Aug 1, 2002
Close Price:$# Sep 3, 2002
Close Price:$# Oct 1, 2002
Close Price:$# Nov 1, 2002
Close Price:$# Dec 2, 2002
Close Price:$# Jan 2, 2003
Close Price:$# Feb 3, 2003
Close Price:$# Mar 3, 2003
Close Price:$# Apr 1, 2003
Close Price:$# May 1, 2003
Close Price:$# Jun 2, 2003
Close Price:$# Jul 1, 2003
Close Price:$# Aug 1, 2003
Close Price:$#
 

Since you can combine several applets into a table, sometimes the most convenient way to build a typical price/volume finance chart is to combine a couple of applets into a table like this.

Any number of indicators can be combined into a series of charts with the same style and scaling.

If you want to combine multiple indicators into the same chart window, use KavaChart's kcfinance package or one of our combination charts.

Jun 1, 1999
Y: 64.59 Jul 1, 1999
Y: 59.82 Aug 2, 1999
Y: 65.36 Sep 1, 1999
Y: 62.09 Oct 1, 1999
Y: 69.49 Nov 1, 1999
Y: 73.33 Dec 1, 1999
Y: 72.23 Jan 3, 2000
Y: 80.06 Feb 1, 2000
Y: 76.06 Mar 1, 2000
Y: 82.81 Apr 3, 2000
Y: 93.62 May 1, 2000
Y: 70.63 Jun 1, 2000
Y: 58.06 Jul 3, 2000
Y: 56.94 Aug 1, 2000
Y: 70 Sep 1, 2000
Y: 65 Oct 2, 2000
Y: 62.12 Nov 1, 2000
Y: 49.5 Dec 1, 2000
Y: 50.94 Jan 2, 2001
Y: 53.7 Feb 1, 2001
Y: 53.32 Mar 1, 2001
Y: 51.85 Apr 2, 2001
Y: 54.32 May 1, 2001
Y: 56.9 Jun 1, 2001
Y: 64.35 Jul 2, 2001
Y: 63.6 Aug 1, 2001
Y: 54.75 Sep 4, 2001
Y: 42.9 Oct 1, 2001
Y: 41.32 Nov 1, 2001
Y: 49.7 Dec 3, 2001
Y: 48.6 Jan 2, 2002
Y: 51.14 Feb 4, 2002
Y: 52.98 Mar 1, 2002
Y: 60.45 Apr 1, 2002
Y: 64.15 May 1, 2002
Y: 62.15 Jun 3, 2002
Y: 53.45 Jul 1, 2002
Y: 46.55 Aug 1, 2002
Y: 47.86 Sep 3, 2002
Y: 38.9 Oct 1, 2002
Y: 33.25 Nov 1, 2002
Y: 39.7 Dec 2, 2002
Y: 36.86 Jan 2, 2003
Y: 36.33 Feb 3, 2003
Y: 33.77 Mar 3, 2003
Y: 33.62 Apr 1, 2003
Y: 36.05 May 1, 2003
Y: 35.33 Jun 2, 2003
Y: 36 Jul 1, 2003
Y: 37.43 Aug 1, 2003
Y: 36.56 Jun 1, 1999
Volume: # Jul 1, 1999
Volume: # Aug 2, 1999
Volume: # Sep 1, 1999
Volume: # Oct 1, 1999
Volume: # Nov 1, 1999
Volume: # Dec 1, 1999
Volume: # Jan 3, 2000
Volume: # Feb 1, 2000
Volume: # Mar 1, 2000
Volume: # Apr 3, 2000
Volume: # May 1, 2000
Volume: # Jun 1, 2000
Volume: # Jul 3, 2000
Volume: # Aug 1, 2000
Volume: # Sep 1, 2000
Volume: # Oct 2, 2000
Volume: # Nov 1, 2000
Volume: # Dec 1, 2000
Volume: # Jan 2, 2001
Volume: # Feb 1, 2001
Volume: # Mar 1, 2001
Volume: # Apr 2, 2001
Volume: # May 1, 2001
Volume: # Jun 1, 2001
Volume: # Jul 2, 2001
Volume: # Aug 1, 2001
Volume: # Sep 4, 2001
Volume: # Oct 1, 2001
Volume: # Nov 1, 2001
Volume: # Dec 3, 2001
Volume: # Jan 2, 2002
Volume: # Feb 4, 2002
Volume: # Mar 1, 2002
Volume: # Apr 1, 2002
Volume: # May 1, 2002
Volume: # Jun 3, 2002
Volume: # Jul 1, 2002
Volume: # Aug 1, 2002
Volume: # Sep 3, 2002
Volume: # Oct 1, 2002
Volume: # Nov 1, 2002
Volume: # Dec 2, 2002
Volume: # Jan 2, 2003
Volume: # Feb 3, 2003
Volume: # Mar 3, 2003
Volume: # Apr 1, 2003
Volume: # May 1, 2003
Volume: # Jun 2, 2003
Volume: # Jul 1, 2003
Volume: # Aug 1, 2003
Volume: #
 

For example, this combination uses KavaChart's OHLC applet, together with a variant of bar charts called "stickApp" to create another typical finance chart style.

We also added a reference line on the price chart at $50, and changed the labels to currency labels using other applet params.

Jun 1, 1999
Y: 64.59 Jul 1, 1999
Y: 59.82 Aug 2, 1999
Y: 65.36 Sep 1, 1999
Y: 62.09 Oct 1, 1999
Y: 69.49 Nov 1, 1999
Y: 73.33 Dec 1, 1999
Y: 72.23 Jan 3, 2000
Y: 80.06 Feb 1, 2000
Y: 76.06 Mar 1, 2000
Y: 82.81 Apr 3, 2000
Y: 93.62 May 1, 2000
Y: 70.63 Jun 1, 2000
Y: 58.06 Jul 3, 2000
Y: 56.94 Aug 1, 2000
Y: 70 Sep 1, 2000
Y: 65 Oct 2, 2000
Y: 62.12 Nov 1, 2000
Y: 49.5 Dec 1, 2000
Y: 50.94 Jan 2, 2001
Y: 53.7 Feb 1, 2001
Y: 53.32 Mar 1, 2001
Y: 51.85 Apr 2, 2001
Y: 54.32 May 1, 2001
Y: 56.9 Jun 1, 2001
Y: 64.35 Jul 2, 2001
Y: 63.6 Aug 1, 2001
Y: 54.75 Sep 4, 2001
Y: 42.9 Oct 1, 2001
Y: 41.32 Nov 1, 2001
Y: 49.7 Dec 3, 2001
Y: 48.6 Jan 2, 2002
Y: 51.14 Feb 4, 2002
Y: 52.98 Mar 1, 2002
Y: 60.45 Apr 1, 2002
Y: 64.15 May 1, 2002
Y: 62.15 Jun 3, 2002
Y: 53.45 Jul 1, 2002
Y: 46.55 Aug 1, 2002
Y: 47.86 Sep 3, 2002
Y: 38.9 Oct 1, 2002
Y: 33.25 Nov 1, 2002
Y: 39.7 Dec 2, 2002
Y: 36.86 Jan 2, 2003
Y: 36.33 Feb 3, 2003
Y: 33.77 Mar 3, 2003
Y: 33.62 Apr 1, 2003
Y: 36.05 May 1, 2003
Y: 35.33 Jun 2, 2003
Y: 36 Jul 1, 2003
Y: 37.43 Aug 1, 2003
Y: 36.56 Jun 1, 1999
Volume: # Jul 1, 1999
Volume: # Aug 2, 1999
Volume: # Sep 1, 1999
Volume: # Oct 1, 1999
Volume: # Nov 1, 1999
Volume: # Dec 1, 1999
Volume: # Jan 3, 2000
Volume: # Feb 1, 2000
Volume: # Mar 1, 2000
Volume: # Apr 3, 2000
Volume: # May 1, 2000
Volume: # Jun 1, 2000
Volume: # Jul 3, 2000
Volume: # Aug 1, 2000
Volume: # Sep 1, 2000
Volume: # Oct 2, 2000
Volume: # Nov 1, 2000
Volume: # Dec 1, 2000
Volume: # Jan 2, 2001
Volume: # Feb 1, 2001
Volume: # Mar 1, 2001
Volume: # Apr 2, 2001
Volume: # May 1, 2001
Volume: # Jun 1, 2001
Volume: # Jul 2, 2001
Volume: # Aug 1, 2001
Volume: # Sep 4, 2001
Volume: # Oct 1, 2001
Volume: # Nov 1, 2001
Volume: # Dec 3, 2001
Volume: # Jan 2, 2002
Volume: # Feb 4, 2002
Volume: # Mar 1, 2002
Volume: # Apr 1, 2002
Volume: # May 1, 2002
Volume: # Jun 3, 2002
Volume: # Jul 1, 2002
Volume: # Aug 1, 2002
Volume: # Sep 3, 2002
Volume: # Oct 1, 2002
Volume: # Nov 1, 2002
Volume: # Dec 2, 2002
Volume: # Jan 2, 2003
Volume: # Feb 3, 2003
Volume: # Mar 3, 2003
Volume: # Apr 1, 2003
Volume: # May 1, 2003
Volume: # Jun 2, 2003
Volume: # Jul 1, 2003
Volume: # Aug 1, 2003
Volume: #