Online Chat
 Call Us: 
1-877-744-1221
Browse Submit a Ticket
 
Advanced Search
Tools
Rss Categories

Candlestick Chart

Author: Antony Corsten Reference Number: AA-00320 Views: 4757 Last Updated: 05/24/2011 12:26 PM 0 Rating/ Voters

Candlestick Chart

Sample XML for Candlestick Chart:

<?xml version="1.0" encoding="iso-8859-1"?>

<graph>

<general_settings bg_color="CCCCCC" type_graph="1">

<header text="Test header" font="Verdana" color="000000" size="18" />

<subheader text="Test Subheader" font="Verdana" color="000000" size="15" />

<legend_popup font="Verdana" bgcolor="FFFFE3" font_size="10" />

<Xheaders rotate="90" color="000000" size="10" title="Test Xheaders" title_color="000000" />

<Yheaders color="000000" size="10" title="Test Yheaders" title_rotate="90" title_color="000000" />

<grid showX="1" showY="1" yAxisLines="5" yAxisMinValue="1000" yAxisMaxValue="5000" grid_width="550" grid_height="250" grid_color="000000" grid_alpha="40" grid_thickness="1" bg_color="fafadb" bg_alpha="100" alternate_bg_color="DDF0C4" border_color="000000" border_thickness="2" />

</general_settings>



<calibration_line lineColor="" lineThickness="1" lineAlpha="40">

<line name="Split" xIndex="3" showLine="1" />

<line name="Holiday" xIndex="10" showLine="1" />

<line name="Dividend" xIndex="13" showLine="1" />

</calibration_line>



<data>

<set open="92.57" high="93.79" low="92.45" close="93.39" color="" xIndex="1" link="abc.html" date="01/12/2000" />

<set open="92.4" high="92.7" low="91.42" close="92.45" xIndex="2" date="01/01/2001" />

<set open="92.6" high="92.69" low="90.88" close="91.82" xIndex="3" date="01/02/2001" />

<set open="92" high="93.38" low="91.68" close="93.3" xIndex="4" date="01/03/2001" />

<set open="92" high="92.98" low="91.15" close="91.21" xIndex="5" date="01/04/2001" />

<set open="94.38" high="94.74" low="92.68" close="93.06" xIndex="6" date="01/05/2001" />

<set open="94.3" high="95.28" low="93.77" close="94.53" xIndex="7" date="01/06/2001" color="00FF00" />

<set open="96.49" high="96.88" low="94.59" close="94.59" xIndex="8" date="01/07/2001" />

<set open="95.95" high="96.98" low="95.56" close="96.45" xIndex="9" date="01/08/2001" />

<set hide="1" date="01/09/2001" />

<set open="96.57" high="96.89" low="95.6" close="96.84" xIndex="11" date="01/10/2001" />

<set open="97.6" high="97.6" low="96.62" close="96.82" xIndex="12" date="01/11/2001" />

<set open="96.5" high="97.25" low="96.15" close="97.04" xIndex="13" date="01/12/2001" />

<set open="96.8" high="97.38" low="96.1" close="96.5" xIndex="14" date="01/13/2001" />

<set open="96.27" high="97.26" low="96.25" close="96.79" xIndex="15" date="01/14/2001" />

</data>

</graph>

Description:


Header tag of the XML file:

<?xml version="1.0" encoding="ISO-8859-1"?>

<graph>...</graph>

You should place a valid XML header at the beginning of every XML file. If you use symbols different from Latin-1 encoding, please set the right encoding for you. In order to get more universality you can use Unicode:

<?xml version="1.0" encoding="utf-8"?>

<graph>

Setting up the appearance of the Candlestick chart:


<general_settings bg_color="CCCCCC" type_graph="1">...</general_settings>
Attribute Description
bg_color "000000" - background general color
type_graph "1" - type of the appearance:
'1' - point of data is shown as a combination of a line and a rectangle

'2' - point of data is shown as a combination of horizontal and vertical lines

Setting up the top row of the general header (the uppermost text):

<header text="Test header" font="Verdana" color="000000" size="18" />

Data:
Attribute Description
text "Test header" - Header content
font "Verdana" - Header font
color "000000" - Header color
size "18" – Header font size

Setting up the bottom row of the general header (the text second from above):

<subheader text="Test Subheader" font="Verdana" color="000000" size="15" />

Data:
Attribute Description
text 'Test subheader' - Header content
font 'Verdana' - Header font
color '000000' - Header color
size '15' - Header font size

Setting up the view of the popup which appears on mouse over the points of data:

<legend_popup font="Verdana" bgcolor="FFFFE3" font_size="10" />

Data:
Attribute Description
font 'Verdana' - caption font
bgcolor 'FFFFE3' - popup background color
size '10' - caption font size

Setting up the view of calibration text on axis X of the graph:

<Xheaders rotate="90" color="000000" size="10" title="Test Xheaders" title_color="000000" />

Data:
Attribute Description
rotate '90' - Text rotation angle (there are two values possible 0 and 90°)
color '000000'- text color
size '10'- font size
title 'Test Xheaders' - caption content for X axis
title_color '000000' - caption text color

Setting up the view of graduation text on axis Y of the graph:

<Yheaders color="000000" size="10" title="Test Yheaders" title_rotate="90" title_color="000000" />

Data:
Attribute Description
color '000000' - text color
size '10' - font size
title 'Test Yheaders' - caption content for Y axis
title_rotate '90' - Caption rotation angle (there are two values possible 0 and 90°)
title_color '000000' - caption text color

Setting up the view of the chart grid:

<grid showX="1" showY="1" yAxisLines="5" yAxisMinValue="1000" yAxisMaxValue="5000" grid_width="550" grid_height="250" grid_color="000000" grid_alpha="40" grid_thickness="1" bg_color="fafadb" bg_alpha="100" alternate_bg_color="DDF0C4" border_color="000000" border_thickness="2" />

Data:
Attribute Description
showX '1' - showing of grid lines:

'1' - to show

'0' - not to show
showY '1' - showing of grid lines:
'1' - to show

'0' - not to show
yAxisLines "5" - number of grid lines on Y axis
yAxisMinValue "1000" - minimal displayed value on Y axis
yAxisMaxValue "5000" - maximal displayed value on Y axis
grid_width '550' - grid width (in pixels)
grid_height '250' - grid height (in pixels)
grid_color '000000' - grid lines color
grid_alpha '40' - grid lines alpha-transparency (between 0 and 100 )
grid_thickness '1' - grid lines thickness
bg_color 'fafadb'' - grid field background color
bg_alpha '100' - grid field background alpha-transparency
alternate_bg_color 'DDF0C4' - grid rectangular alternate fields color
border_color '000000' - grid border color
border_thickness '2' - grid border thickness

Setting up additional vertical lines:

<calibration_line lineColor="" lineThickness="1" lineAlpha="40">

<line name="Split" xIndex="3" showLine="1" />

...

<line name="Dividend" xIndex="13" showLine="1" />

</calibration_line>

Data:
Attribute Description
lineColor "" - lines color (if attribute is empty it will be equal to the color of the grid lines)
lineThickness "1" - lines thickness
grid_alpha '40' - lines alpha-transparency
name "Split" - name displayed under the line on X
xIndex "3" - index which defines line position along X axis
showLine "1" - Showing the line:
'1' - to show

'0' - not to show

Setting up the data:

<data>

<set open="92.57" high="93.79" low="92.45" close="93.39" color="" xIndex="1" link="abc.html" date="01/12/2000" />

...

<set open="96.27" high="97.26" low="96.25" close="96.79" xIndex="15" date="01/14/2001" />

</data>

Data:
Attribute Description
<set /> Tag <set … /> defines a point of data, which is displayed as a combination of a line and a rectangle (if type_graph="1") or a combination of vertical and horizontal lines (if type_graph="2")
open "92.57" - defines position of the bottom end of the rectangle (if type_graph="1") or the horizontal line(if type_graph="2")
high "93.79" - defines position of the top end of the vertical
low "91.42" - defines position of the bottom end of the vertical
close "92.45" - defines position of the top end of the rectangle (if type_graph="1") or the horizontal line(if type_graph="2")
xIndex "2" - point of data index (!! Index values must go in order from 1 (xIndex="1")) , it may be used for the placement of additional vertical lines (see tags <calibration_line>…</calibration_line> )
date "01/01/2001" - Date. It will be displayed at the popup hint when mouse points on the data. Other attributes of the tag <set …. /> may be added
color "00FF00" - internal part of a rectangle or a line.
link "abc.html" - link on the page which opens when clicking on the data point

To hide some element it is sufficient to define attribute hide="1" at the correspondent tag <set … /> , If hide="0", hide="" or attribute is not defined element will be displayed!
Attachments
fcp-candlestick-charts-v1 2.4 Kb Download File
fcp-candlestick-charts-v2 3 Kb Download File