Highcharts test tool

by oysteinmoseng

HTML

<script src="http://code.highcharts.local/highcharts.src.js"></script>
<script src="http://code.highcharts.local/modules/heatmap.src.js"></script>
<script src="http://code.highcharts.local/modules/treemap.src.js?1"></script>
<div id="container"></div>

CSS

#container {
    min-width: 300px;
    max-width: 800px;
    height: 300px;
    margin: 1em auto;
}

JavaScript

$('#container').highcharts({

    /*
    colorAxis: {

        dataClasses: [{
            from: 0,
            to: 30,
            color: '#C40401',
            name: 'McCain'
        }, {
            from: 30,
            to: 100,
            color: '#0200D0',
            name: 'Obama'
        }]
    },*/
  
    colorAxis: {
        min: 0,
        max: 50,
        maxColor: '#450000',
        minColor: '#A04040'
    },

    series: [{
        dataLabels: {
            enabled: true
        },
        type: "treemap",
        data: [{
            id: 0,
            value: 50,
            colorValue: 25
        }, {
            id: 1,
            value: 25,
            colorValue: 25
        }, {
            id: 2,
            value: 12.5,
            colorValue: 25
        }, {
            id: 3,
            value: 12.5,
            colorValue: 25
        }]
    }]

});