FusionCharts - Gallery Example - Heatmap Chart 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>
<!-- 
    Heatmap chart showing score for various smartphones, by features.
-->
<div id="chart-container">FusionCharts will render here</div>

JavaScript

FusionCharts.ready(function() {
  var salesHMChart = new FusionCharts({
    type: 'heatmap',
    renderAt: 'chart-container',
    width: '700',
    height: '350',
    dataFormat: 'json',
    dataSource: {
      "chart": {
        "theme": "fusion",
        "caption": "Job Happiness Index By Roles",
        "subCaption": "Harry's Supermart",
        "showValues": "1",
        "showBorder": "0",
        "showPlotBorder": "1"
      },
      "rows": {
        "row": [{
          "id": "Admin"
        }, {
          "id": "Accounting"
        }, {
          "id": "Operations"
        }, {
          "id": "Marketing"
        }, {
          "id": "Sales"
        }]
      },
      "columns": {
        "column": [{
          "id": "BC",
          "label": "Bakersfield Central"
        }, {
          "id": "GGH",
          "label": "Garden Groove harbour"
        }, {
          "id": "LAT",
          "label": "Los Angeles Topanga"
        }, {
          "id": "CRD",
          "label": "Compton-Rancho Dom"
        }, {
          "id": "DCS",
          "label": "Daly City Serramonte"
        }]
      },
      "dataset": [{
        "data": [{
          "rowid": "Admin",
          "columnid": "BC",
          "value": "2",
          "showValue": "0"
        }, {
          "rowid": "Admin",
          "columnid": "GGH",
          "value": "3",
          "showValue": "0"
        }, {
          "rowid": "Admin",
          "columnid": "LAT",
          "value": "3",
          "showValue": "0"
        }, {
          "rowid": "Admin",
          "columnid": "CRD",
          "value": "2",
          "showValue": "0"
        }, {
          "rowid": "Admin",
          "columnid": "DCS",
          "value": "1",
          "showValue": "0"
        }, {
          "rowid": "Accounting",
          "columnid": "BC",
          "value": "3",
          "showValue": "0"
        }, {
          "rowid": "Accounting",
          "columnid": "GGH",
          "value": "2",
          "showValue": "0"
       ...