Tilemap, diamonds
author(s):
Øystein Moseng
HTML
<script src="https://code.highcharts.com/maps/highmaps.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/offline-exporting.js"></script>
<script src="https://code.highcharts.com/modules/accessibility.js"></script>
<div id="container"></div>
CSS
body {
background: var(--highcharts-background-color);
color: var(--highcharts-neutral-color-100);
}
#container {
min-width: 380px;
max-width: 700px;
margin: 0 auto;
}
JavaScript
Highcharts.chart('container', {
chart: {
type: 'tilemap',
marginTop: 15,
height: '65%'
},
title: {
text: 'Idea map'
},
subtitle: {
text: 'Hover over tiles for details'
},
colors: [
'#fed',
'#ffddc0',
'#ecb',
'#dba',
'#c99',
'#b88',
'#aa7577',
'#9f6a66'
],
accessibility: {
point: {
valueDescriptionFormat: '{point.name}. {point.desc}'
},
typeDescription: 'Idea map, laid out as tiles with the main idea in ' +
'the centre. Steps related to the main idea are shown as ' +
'additional tiles circling the centre tile.'
},
xAxis: {
visible: false
},
yAxis: {
visible: false
},
legend: {
enabled: false
},
tooltip: {
headerFormat: '',
pointFormat: '<span style="color: {point.color}">●</span>' +
'<span style="font-size: 13px; font-weight: bold"> {point.name}' +
'</span><br>{point.desc}',
style: {
width: 170
},
padding: 10,
hideDelay: 1000000
},
plotOptions: {
series: {
keys: ['x', 'y', 'name', 'desc'],
tileShape: 'diamond',
dataLabels: {
enabled: true,
format: '{point.name}',
color: '#000000',
style: {
textOutline: false
}
}
}
},
series: [{
name: 'Main idea',
pointPadding: 10,
data: [
[
5, 3, 'Main idea',
'The main idea tile outlines the overall theme of the idea ' +
'map.'
]
],
color: '#7eb'
}, {
name: 'Steps',
colorByPoint: true, // Pick new color for each point from colors array
data: [
[
...