|
- Quotes Applet
The Quotes Applet will allow you to display customized quotes
from Barchart.com directly onto your website. The quotes applet
is fully customizable and will work for both stocks and commodities.
You can customize the symbols, alias to names, background colors,
foreground colors, fonts, sizes, columns, rows, data, displays and
styles, among other attributes.
The Quotes Applet will also work in conjunction with the co-brands.
EXAMPLE 1:
The code to produce this is:
<APPLET NAME="QuotePage"
CODE="QuotePage.class"
CODEBASE="http://java.barchart.com/quotepage"
HEIGHT="150" WIDTH="250"
>
<PARAM NAME="symbols" VALUE="'Stocks,yhoo,msft,amzn:Amazon,'Futures,CZ8:Corn Dec,SBH8,RSH8:Canola May 08">
<PARAM NAME="bgcolor" VALUE="CCCC99">
<PARAM NAME="fgcolor" VALUE="000000">
<PARAM NAME="pscolor" VALUE="005500">
<PARAM NAME="ngcolor" VALUE="AA0000">
<PARAM NAME="numcols" VALUE="2">
<PARAM NAME="numrows" VALUE="8">
<PARAM NAME="crorder" VALUE="down">
<PARAM NAME="data" VALUE="price, change, percent">
<PARAM NAME="display" VALUE="fractions">
<PARAM NAME="fface" VALUE="Courier">
<PARAM NAME="fsize" VALUE="12">
<PARAM NAME="fstyle" VALUE="Normal">
</APPLET>
EXAMPLE 2:
The code to produce this is:
<APPLET NAME="QuotePage"
CODE="QuotePage.class"
CODEBASE="http://java.barchart.com/quotepage"
HEIGHT="80" WIDTH="210"
>
<PARAM NAME="symbols" VALUE="'Indices,$NYS:NYSE Comp,$NASX:Nasd Comp,$IUX:Russell">
<PARAM NAME="bgcolor" VALUE="FFFFFF">
<PARAM NAME="fgcolor" VALUE="000000">
<PARAM NAME="pscolor" VALUE="005500">
<PARAM NAME="ngcolor" VALUE="AA0000">
<PARAM NAME="numcols" VALUE="1">
<PARAM NAME="numrows" VALUE="5">
<PARAM NAME="crorder" VALUE="down">
<PARAM NAME="data" VALUE="price, percent">
<PARAM NAME="display" VALUE="fractions">
<PARAM NAME="fface" VALUE="Courier">
<PARAM NAME="fsize" VALUE="12">
<PARAM NAME="fstyle" VALUE="Normal">
</APPLET>
NB: Please make sure that the width/height are adjusted and large
enough to actually display the data. If you set the width to 10, and the font
size to 500, the applet will be too small to show the results.
Explanation of tags:
- symbols: comma delimited list of symbol:aliases. Note, aliases are optional.
- bgcolor: the hex color value for the background
- fgcolor: the hex color value for the main text
- pscolor: the hex color value for positive values
- ngcolor: the hex color value for negative values
- numcols: the number of columns
- numrows: the number of rows
- crorder: the order of placement of values. Possible values are: across and down.
- data: what you want listed. Note: symbol is automatic, but choose any of the following price, change, percent, volume
- display: either in fractions or decimals
- fface: the font face: Times, Helvetica, Courier.
- fsize: the font size.
- fstyle: the font style: Normal, Bold, Italic
The quotes applet can be made compatible with the co-brands by adding the following line of code.
<PARAM NAME="cobrand" VALUE="****"> where **** represents your sites code.
|