JViews Demo: Stock Viewer
The following is an interactive, web based Stock Viewer demo built with Rogue Wave JViews Enterprise. You can try it yourself by downloading an evaluation or to receive an online demonstration and have a product expert answer any questions you may have, click here.
About this demo
This example shows how to generate server-side charts in a DHTML thin-client environment. A servlet retrieves quotes from the Yahoo finance Web site and generates the corresponding stock prices chart and various financial indicators on the fly. Charts are displayed by Rogue Wave JViews Charts faces components that render client-side DHTML.
How to use this demo
This example allows you to display the stock quotes of one or several companies, as well as several technical market indicators. Two kinds of charts are used to display the stock data:
The loading of quotes is specified by the controls available in the query panel:
Quotes are automatically loaded when the duration or the frequency of the query is modified. However, an explicit reload request must be made after changing the ticker symbols. To request an explicit reload of the stock data, select the Draw button on the toolbar.
The Indicators controls let you specify the technical indicators that must be displayed by the corresponding charts. These indicators are split into two categories:
Controlling the Visible Range
By Fixed Zoom Factor
To perform a zoom by a fixed zoom factor (x2/x.5), use the following toolbar buttons:
Note: All these interactions are disabled when a local zoom is set.
The Zoom History
Whenever a zoom is performed, the previous zoom level is stored in the zoom history. You can browse the zoom history with the following toolbar buttons:
Using Threshold Lines
Threshold lines let you specify upper and lower price limits for the primary symbol within the main chart. You can activate and deactivate the threshold lines with the toolbar button.
The threshold limits can be edited by clicking within the scale annotation of the threshold bar to move and drag the annotation along the y-axis.
When threshold lines are activated, the rendering style of the data points depends on their price value:
Controlling Display Properties
The following properties are accessible through the vertical toolbar.
The Overview Representation toolbar lets you choose the chart representation of the primary symbol when it is in overview mode. This mode is set when the visible time range exceeds the duration of approximately three months for daily data, and approximately one year for weekly data. Four representation types are available:
The Logarithmic Price Axis button ( ) lets you specify whether the y-scale of the quote chart is logarithmic or linear.