Timeline
author(s):
Daniel Studencki
by oysteinmoseng
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/timeline.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/accessibility.js"></script>
<figure class="highcharts-figure">
<div id="container"></div>
</figure>
CSS
.highcharts-strong {
font-weight: bold;
}
.highcharts-figure, .highcharts-data-table table {
min-width: 1000px;
max-width: 1200px;
margin: 1em auto;
}
.highcharts-data-table table {
font-family: Verdana, sans-serif;
border-collapse: collapse;
border: 1px solid #EBEBEB;
margin: 10px auto;
text-align: center;
width: 100%;
max-width: 500px;
}
.highcharts-data-table caption {
padding: 1em 0;
font-size: 1.2em;
color: #555;
}
.highcharts-data-table th {
font-weight: 600;
padding: 0.5em;
}
.highcharts-data-table td, .highcharts-data-table th, .highcharts-data-table caption {
padding: 0.5em;
}
.highcharts-data-table thead tr, .highcharts-data-table tr:nth-child(even) {
background: #f8f8f8;
}
.highcharts-data-table tr:hover {
background: #f1f7ff;
}
JavaScript
Highcharts.chart('container', {
chart: {
type: 'timeline'
},
accessibility: {
screenReaderSection: {
beforeChartFormat: '<h5>{chartTitle}</h5>' +
'<div>{chartSubtitle}</div>' +
'<div>{chartLongdesc}</div>'
},
point: {
valueDescriptionFormat: '{point.name}. {point.label}.'
}
},
xAxis: {
visible: false
},
yAxis: {
visible: false
},
title: {
text: 'Highcharts accessibility features'
},
subtitle: {
text: 'Visualized by time and version'
},
exporting: {
enabled: false
},
colors: [
'#4185F3',
'#427CDD',
'#406AB2',
'#3E5A8E',
'#3B4A68',
'#363C46'
],
series: [{
data: [{
name: 'A11y module',
label: 'v5.0.0 (2016): Basic screen reader and keyboard navigation support'
}, {
name: 'Tactile',
label: 'v5.0.0 (2016): Enhanced support for static SVG export for tactile representations'
}, {
name: 'Legend a11y',
label: 'v5.0.1 (2016): Chart legend keyboard a11y introduced',
}, {
name: 'I18n',
label: 'v6.0.7 (2018): Internationalization support for a11y features'
}, {
name: 'Sonification',
label: 'v7.0.0 (2018): Added sonification API'
}, {
name: 'Cognitive',
label: 'v7.1.0 (2018): Improvements for cognitive usability'
}, {
name: 'Dynamic data',
label: 'v7.1.0 (2018): Added screen reader support for dynamic data'
}, {
name: 'Drilldown',
label: 'v7.1.0 (2018): Added screen reader support for drilldown'
}, {
name: 'Voice input',
label: 'v7.1.0 (2018): Added support for voice input software'
}, {
name: 'High Contrast',
label:...