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": "Top Smartphone Ratings",
        "subcaption": "By Features",
        "xAxisName": "Features",
        "yAxisName": "Model",
        "showValues": "1",
        "showplotborder": "1",
        "xAxisLabelsOnTop": "1",
        "plottooltext": "<div><b>$rowLabel</b><br/>Customer Ratings for $columnLabel : <b>$datavalue</b></div>"
      },
      "rows": {
        "row": [{
          "id": "SGS5",
          "label": "Samsung Galaxy S5"
        }, {
          "id": "HTC1M8",
          "label": "HTC One (M8)"
        }, {
          "id": "IPHONES5",
          "label": "Apple iPhone 5S"
        }, {
          "id": "LUMIA",
          "label": "Nokia Lumia 1520"
        }]
      },
      "columns": {
        "column": [{
          "id": "processor",
          "label": "Processor"
        }, {
          "id": "screen",
          "label": "Screen Size"
        }, {
          "id": "price",
          "label": "Price"
        }, {
          "id": "backup",
          "label": "Battery Backup"
        }, {
          "id": "cam",
          "label": "Camera"
        }]
      },
      "dataset": [{
        "data": [{
          "rowid": "SGS5",
          "columnid": "processor",
          "value": "8.7",
          "tlLabel": "Quad Core 2.5 GHz"
        }, {
          "rowid": "SGS5",
          "columnid": "screen",
          "value": "8.5",
          //Displaying a label on the bottom left corner of a dataplot
          "blLabel": "5.1 inch",
          //Displaying a label on the bottom right corner of a dataplot
          "brLabel": "AMOLED screen"
        }, {
          "rowid": "SGS5",
          "columnid": "price",
          "value": "9.3",
          //Displaying a label on the top left corner of a dataplot
       ...