FusionCharts - Gallery Example - Multi-series Bar 2D Chart

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>
<!-- Multi Series Bar 2D chart showing sales as per two major categories in different stores of Harry's Supermart -->
<div id="chart-container">FusionCharts will render here</div>

JavaScript

FusionCharts.ready(function() {
  var revenueChart = new FusionCharts({
    type: 'msbar2d',
    renderAt: 'chart-container',
    width: '600',
    height: '500',
    dataFormat: 'json',
    dataSource: {
      "chart": {
        "theme": "fusion",
        "caption": "Split of Sales by Product Category",
        "subCaption": "In top 5 stores last month",
        "yAxisname": "Sales (In USD)",
        "numberPrefix": "$"
      },
      "categories": [{
        "category": [{
            "label": "Bakersfield Central"
          },
          {
            "label": "Garden Groove harbour"
          },
          {
            "label": "Los Angeles Topanga"
          },
          {
            "label": "Compton-Rancho Dom"
          },
          {
            "label": "Daly City Serramonte"
          }
        ]
      }],
      "dataset": [{
          "seriesname": "Food Products",
          "data": [{
              "value": "17000"
            },
            {
              "value": "19500"
            },
            {
              "value": "12500"
            },
            {
              "value": "14500"
            },
            {
              "value": "17500"
            }
          ]
        },
        {
          "seriesname": "Non-Food Products",
          "data": [{
              "value": "25400"
            },
            {
              "value": "29800"
            },
            {
              "value": "21800"
            },
            {
              "value": "19500"
            },
            {
              "value": "11500"
            }
          ]
        }
      ],
      "trendlines": [{
        "line": [{
            "startvalue": "15000",
            "color": "#5D62B5",
            "valueOnRight": "1",
            "displayvalue": "Avg. for{br}Food"
          },
          {
            "startvalue": "22000",
            "color": "#29C3BE",
            "valueOnRight": "1",
            "displayvalue": "Avg. for{br}Non-food"
          }
       ...