CandleStick Charts - Trendlines & Vertical trendlines
Created using FusionCharts Suite XT - www.fusioncharts.com
HTML
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.powercharts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js"></script>
<!-- Showing and configuring trendlines and vlines (vertical trendlines).
Element:
# trendlines
# vtrendlines
Attribute:
# startValue
# endValue
# color
# alpha
# thickness
# isTrendZone (etc.)
-->
<div id="chart-container">FusionCharts will render here</div>
JavaScript
FusionCharts.ready(function () {
var stockChart = new FusionCharts({
type: 'candlestick',
renderAt: 'chart-container',
id: 'myChart',
width: '600',
height: '400',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Daily Stock Price HRYS",
"subCaption": "Last 2 months",
"numberprefix":"$",
"pyaxisname":"Price",
"vyaxisname":"Volume (In Millions)",
"showVolumeChart": "1",
"plotHoverEffect": "1",
"plotFillHoverColor": "#000000",
"plotFillHoverAlpha": "10",
"theme": "fint", //"rollOverBandColor": "#000000",
//"rollOverBandAlpha": "0"
},
"categories":[{
"category":[
{
"label":"2 month ago",
"x":"1"
},
{
"label":"1 month ago",
"x":"31"
},
{
"label":"Today",
"x":"60"
}
]
}],
"dataset": [{
"data": [
{
"open":"18.74",
"high":"19.16",
"low":"18.67 ",
"close":"18.99",
"x":"1",
"volume":"4991285",
"alpha": "50"
},
{
"open":"18.74",
"high":"19.06",
"low":"18.54",
"close":"18.82",
"x":"2",
"volume":"3615889"
},
...