FusionCharts - Gallery Example - Combination 2D Chart with dual y-axis in JavaScript
Created using FusionCharts Suite XT - www.fusioncharts.com
by sanjuktamukherjee
HTML
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.charts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js"></script>
<!-- Scroll Combination 2D Chart with dual y-axis. -->
<div id="chart-container">FusionCharts will render here</div>
JavaScript
FusionCharts.ready(function() {
var revenueChart = new FusionCharts({
type: 'scrollcombidy2d',
renderAt: 'chart-container',
width: '550',
height: '250',
dataFormat: 'json',
dataSource: {
"chart": {
"xAxisname": "Month",
"pYAxisName": "Amount (In USD)",
"sYAxisName": "Profit %",
"paletteColors" : "#0075c2,#1aaf5d,#f2c500",
"numVisiblePlot" : "4",
"rotateValues" : "1",
"placeValuesInside": "1",
"labelDisplay": "rotate"
},
"categories": [
{
"category": [
{ "label": "Jan 2012" },
{ "label": "Feb 2012" },
{ "label": "Mar 2012" },
{ "label": "Apr 2012" },
{ "label": "May 2012" }
]
}
],
"dataset": [
{
"seriesName": "Revenues",
"data": [
{ "value": "9" },
{ "value": "1" },
{ "value": "9" },
{ "value": "4" },
{ "value": "5" },
]
},
{
"seriesName": "Revenues2",
"data": [
{ "value": "2" },
{ "value": "5" },
{ "value": "9" },
{ "value": "4" },
{ "value": "5" },
]
},
{
"seriesName": "Profit %",
"parentYAxis": "S",
"renderAs": "line",
"showValues": "0",
"data": [
...