FAST WebComponents |
|
Component: LiveChart |
OverView | | | Protocol | | | WebComponents | | | ChartEngine | | | Mobile | | | Press | |
|
This is an example of the Ticker FAST-WebComponent. It displays one Field of a RIC in realtime and optionaly (if available) an up/down tick in either text (+/-) or Graphics form. Use the following code snippet to use it in a Webpage.
<APPLET name="LiveChart" archive="Core.zip,Jep.zip" code="at.RISNet.FAST.WebComponents.LiveChart.class" codebase="http://ActiveFast.RISNet.at/Fast" width="500" height= "300"> <PARAM NAME="Background" VALUE="b0c4de"> <PARAM NAME="BackgroundImage" VALUE="Reuters.gif"> <PARAM NAME="BackgroundImageMode" VALUE="NORMAL"> <PARAM NAME="Foreground" VALUE="000000"> <PARAM NAME="ChartBackground" VALUE="E0E0E0"> <PARAM NAME="ChartBackgroundImage" VALUE="Stone.jpg"> <PARAM NAME="ChartBackgroundImageMode" VALUE="TILE"> <PARAM NAME="GridForeground" VALUE="C0C0C0"> <PARAM NAME="AxisForeground" VALUE="4169e1"> <PARAM NAME="TitleFont" VALUE="Arial"> <PARAM NAME="TitleFontSize" VALUE="15"> <PARAM NAME="TitleFontType" VALUE="BOLD"> <PARAM NAME="LabelFont" VALUE="Arial"> <PARAM NAME="LabelFontSize" VALUE="10"> <PARAM NAME="LabelFontType" VALUE="ITALIC"> <PARAM NAME="AxisFont" VALUE="Arial"> <PARAM NAME="AxisFontSize" VALUE="10"> <PARAM NAME="AxisFontType" VALUE="PLAIN"> <PARAM NAME="UpdateURL" VALUE="http://ActiveFAST.RISNet.at/Fast/ActiveFAST.asp"> <PARAM NAME="UpdateInterval" VALUE="10"> <PARAM NAME="RIC" VALUE=".ATX"> <PARAM NAME="ValueFID" VALUE="TRDPRC_1"> <PARAM NAME="onClick" VALUE="http://Fast.RISNet.at/Fast"> <PARAM NAME="onClickTarget" VALUE="_blank"> <PARAM NAME="Title" Value="Austrian Index"> <PARAM NAME="Decimals" VALUE="2"> <PARAM NAME="3DGrid" VALUE="NO"> <PARAM NAME="Debug" VALUE="YES"> </APPLET>
The applet can operate in 2 modes: TICK and POLL. In TICK mode a connection to the ActiveFAST server is established and remains open. Every change in the "ValueFID" is immediately displayed on screen. In the moment every ActiveFAST WebComponent uses it's own connection to the ActiveFAST server. When there are a lot of WebComponents on a page this can become very inefficient. There will be a multiplexer applet available in the near future, but for the moment dont use a lot of WebComponents in TICK mode on one page. The PULL mode as the name says pulls new data from the Server in predefined intervals (see the UpdateInterval parameter). This mode is very efective because the connection is closed during the pull cycles. The operation of the component is specified by the two parameters Port and UpdateURL. If Port is specified then the component uses TICK mode, if UpdateURL is specified then PULL mode is used. If no one is specified then TICK mode is used. In the case that both are specified then PULL mode is used. Keep in mind that an applet can only (under normal circumstances) communicate with the server from which it was loaded by the browser. So keep your WebComponents on the ActiveFAST server. A detailed description of the various parameters follows:
Parameter | Description | Default | Example |
---|---|---|---|
Background | Background color of this Applet in hex form | FFFFFF | eg. FFFFFF |
BackgroundImage | Background for the whole applet | - | eg. Reuters.gif |
BackgroundImageMode | how to draw the BackgroundImage | NORMAL | NORMAL, FIT, TILE |
Foreground | Foreground color of this Applet in hex form | 000000 | eg. 8080FF |
ChartBackground | Background color of the actual charting area | E0E0E0 | eg. FF0099 |
ChartBackgroundImage | Background image of the charting area | - | eg. Stone.jpg |
ChartBackgroundImageMode | how to draw the ChartBackgroundImage | NORMAL | NORMAL, FIT, TILE |
GridForeground | Foreground color of the gridlines | C0C0C0 | eg. 3300FF |
AxisForeground | Foreground color of axis lines and markers | 000000 | eg. 8080FF |
TitleFont | Name of Font to use for the chart title | Arial | eg. Courier |
TitleFontSize | Font size of the chart title | 15 | eg. 15 |
TitleFontType | Font Type of the chart title | BOLD | PLAIN, BOLD, ITALIC |
LabelFont | Name of Font to use for the labels under the chart | Arial | eg. Helvetica |
LabelFontSize | Font size of the labels | 10 | eg. 10 |
LabelFontType | Font Type of the labels | ITALIC | PLAIN, BOLD, ITALIC |
AxisFont | Name of Font to use for the axis | Arial | eg. Courier |
AxisFontSize | Font size of the axis | 10 | eg. 10 |
AxisFontType | Font Type axis | PLAIN | PLAIN, BOLD, ITALIC |
Port | port on fast server to connect this client to (for TICK operation) | 18919 | eg. 18919 |
UpdateURL *) | URL where to look for new data (for Pull operation). | - | eg. ActiveFAST.asp |
UpdateInterval | number of seconds to wait between updates (only used in Pull operation) | 10 | eg. 10 |
RIC | RIC (Reuters Instrument Code) to fetch. | .ATX | eg. ATX |
ValueFID | Reuters Value field to display (FID). It is possible
to specify more than one FID here separated by spaces. This can be used in combination with Expressions. |
TRDPRC_1 | eg. TRDPRC_1 |
onClick | URL to jump to when the field is clicked | - | eg. http://www.RISNet.at |
onClickTarget | Target for the onClick URL | - | eg. @DSPLY_NAME |
Title | The Title of the chart. If this string starts with an @ the rest of this string is assumed to be a Reuters FID used to print the Title. | - | eg. Austrian Index |
LicenseKey | to be obtained from RISNet (support@RISNet.at) | - |
eg. Ddj34R-er81fC-Mer15L-oHCx3Q-TR45I2 |
Expression | Provides a way to do mathematical
calculations with the data received from ActiveFAST. The expression is
evaluated AFTER the BasicMath functions. All BasicMath
functions can be replaced with expresions so they will be removed in
further versions. They are only available for compatibility in the moment.
Variable usage is possible within expressions. Some special variables
are available in expressions like PI or E and FAST_Value which is the
result of the BasicMath functions. ActiveFAST fields in the ValueFID
parameter are prefixed with FAST__ (2x underscore). Functions available are: SIN, COS, TAN, ASIN, ACOS, ATAN, SINH, COSH, TANH, ASINH, ACOSH, ATANH, LN, LOG, ANGLE, RE, IM, ABS Operators available: +, -, ^, /, *, !=, ==, <=, >=, <, >, !, ||, && Boolean expressions are evaluated to be either 1 or 0 (true or false respectively). |
- | eg. FAST_Value+1,08
or (FAST_Bid+FAST_Ask)/2 |
Decimals | Specifies how many decimal places should be shown in the output (if it is numeric). The value is rounded to fit into decimals places. | 4 | eg. 2 |
3DGrid | Draws shadings around the grid lines to achive a 3D effect. | NO | YES, NO |
Debug | Shows some debug informations in the Java Console (internal use only) | NO | YES, NO |
LiveChart in PULL mode - timely correct
LiveChart in TICK mode
(C) Copyright RIS-Regionale Informations Systeme GmbH, Prof. Dr. Stefan Koren Str. 10, A-2700 Wr. Neustadt, AUSTRIA, EUROPE & Richard.Prinz@RISNet.at