Highcharts Demo
author(s):
Mustapha Mekhatria
by Chitkala More
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/heatmap.js"></script>
<script src="https://code.highcharts.com/modules/tilemap.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<script src="https://code.highcharts.com/modules/accessibility.js"></script>
<div id="container"></div>
CSS
#container {
min-width: 360px;
max-width: 650px;
margin: 0 auto;
}
caption {
padding-bottom: 15px;
font-family: 'Verdana';
font-size: 1.2em;
color:#555;
}
table {
font-family: 'Verdana';
font-size: 12pt;
border-collapse: collapse;
border: 1px solid #EBEBEB;
margin: 10px auto;
text-align: center;
width: 100%;
}
table tr:nth-child(odd) {
background-color: #fff;
}
table tr:nth-child(even) {
background-color: #FCF9F9;
}
th {
font-weight: 600;
padding: 10px;
}
.pull-left{
float:left;
}
.pull-right{
float:right;
}
.w50p{
width:50%;
}
.text-wrap{
word-break: break-all;
}
.clear, .clearfix {
clear: both;
}
.clearfix:before,
.clearfix:after{
content:'';
display:table;
}
.w100p{
width:140%;
}
JavaScript
Highcharts.chart('container', {
chart: {
type: 'tilemap',
inverted: true,
height: '80%'
},
title: {
text: ''
},
subtitle: {
text: ''
},
exporting: {
enabled: false,
},
credits: {
enabled: false
},
xAxis: {
visible: true,
dataLabels:'dsdsd',
text:'sdsds'
},
yAxis: {
visible: true
},
colorAxis: {
dataClasses: [{
from: 0,
to: 1000000,
color: '#439490',
name: '< 1M'
}, {
from: 1000000,
to: 5000000,
color: '#439490',
name: '1M - 5M'
}, {
from: 5000000,
to: 20000000,
color: '#5dafab',
name: '5M - 20M'
}, {
from: 20000000,
color: '#aeede7',
name: '> 20M'
}]
},
tooltip: {
headerFormat: '',
useHTML: true,
pointFormat: '<span class="clearfix w100p"><span class="pull-left w50p">Risk Score<br>{point.value}</span>'+
'<span class="pull-right w50p text-wrap"><span >Chronic condition<br> well managed</span></span></span>'
},
plotOptions: {
series: {
dataLabels: {
enabled: false,
format: '{point.hc-a2}',
color: '#000000',
style: {
textOutline: false
}
}
}
},
series: [{
name: '',
data: [{
'hc-a2': 'AL',
name: 'Alabama',
region: 'South',
x: 6,
y: 7,
value: 4849377
}, {
'hc-a2': 'AK',
name: 'Alaska',
region: 'West',
x: 0,
y: 0,
value: 737732
}, {
'hc-a2': 'AZ',
name: 'Arizona',
region: 'West',
x: 5,
...