FusionCharts - Gallery Example - Combination 2D Chart with dual y-axis in JavaScript
Created using FusionCharts Suite XT - www.fusioncharts.com
by FusionCharts
HTML
<script src="https://cdn.fusioncharts.com/fusioncharts/latest/fusioncharts.js"></script>
<script src="https://cdn.fusioncharts.com/fusioncharts/latest/themes/fusioncharts.theme.fusion.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: '700',
height: '400',
dataFormat: 'json',
dataSource: {
"chart": {
"theme": "fusion",
"caption": "Revenues and Profits",
"subCaption": "(2016 to 2017)",
"xAxisname": "Month",
"pYAxisName": "Amount (In USD)",
"sYAxisName": "Profit %",
"numberPrefix": "$",
"sNumberSuffix": "%",
"sYAxisMaxValue": "50",
"showValues": "1",
"numVisiblePlot": "12",
"flatScrollBars": "1",
"scrollheight": "10"
},
"categories": [{
"category": [{
"label": "Jan 2016"
},
{
"label": "Feb 2016"
},
{
"label": "Mar 2016"
},
{
"label": "Apr 2016"
},
{
"label": "May 2016"
},
{
"label": "Jun 2016"
},
{
"label": "Jul 2016"
},
{
"label": "Aug 2016"
},
{
"label": "Sep 2016"
},
{
"label": "Oct 2016"
},
{
"label": "Nov 2016"
},
{
"label": "Dec 2016"
},
{
"label": "Jan 2017"
},
{
"label": "Feb 2017"
},
{
"label": "Mar 2017"
},
{
"label": "Apr 2017"
},
{
"label": "May 2017"
},
{
"label": "Jun 2017"
},
{
"label": "Jul 2017"
},
{
"label": "Aug 2017"
},
{
"label": "Sep 2017"
},
{
"label": "Oct 2017"
},
{
"label": "Nov 2017"
...