CandleStick Charts - Different plot type
Created using FusionCharts Suite XT - www.fusioncharts.com
by Ayan Bhadury
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>
<!-- Configuring candlestick chart with different types of rendering (candle, bar, line). This sample showcases a line plot type implementation and selects the opening price value for plotting.
Attribute:
# plotPriceAs
# plotClosingPrice (applicable only in case of line plot type)
-->
<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)",
"plotPriceAs": "line",
"plotClosingPrice": "0",
"theme": "fint",
"plotLineThickness":"4"
},
"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"
},
{
"open":"18.74",
"high":"19.06",
"low":"18.54",
"close":"18.82",
"x":"2",
"volume":"3615889"
},
{
"open":"19.21",
"high":"19.3",
"low":"18.59 ",
"close":"18.65",
"x":"3",
"volume":"4749586"
...