FusionCharts - Gallery Example - Scroll Line 2D Chart

Created using FusionCharts Suite XT - www.fusioncharts.com

by Hexman

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>
<!-- A simple Scroll Line 2D chart -->
<div id="chart-container">FusionCharts will render here</div>

JavaScript

FusionCharts.ready(function() {
  var salesChart = new FusionCharts({
    type: 'scrollline2d',
    dataFormat: 'json',
    renderAt: 'chart-container',
    width: '700',
    height: '400',
    dataSource: {
      "chart": {
        "theme": "fusion",
        "caption": "Sales Trends",
        "subCaption": "(2016 to 2017)",
        "xAxisName": "Month",
        "yAxisName": "Revenue",
        "numberPrefix": "$",
        "lineThickness": "3",
        "flatScrollBars": "1",
        "scrollheight": "5",
        "numVisiblePlot": "5",
        "showHoverEffect": "1"
      },
      "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"
          },
          {
            "label": "Dec 2017"
          }
        ]
     ...