Highcharts Demo
author(s): Torstein Hønsi
by therm81
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/series-label.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<div id="container"></div>
<pre id="csv" style="display:none">
Name For Reports,Confidence,Date
Enterprise Platforms and Products,50%,07-09-2018
Shop Book,50%,07-09-2018
Inline Pricing,50%,07-09-2018
Welcome,50%,07-09-2018
Connected Room,50%,07-09-2018
Guest Meetings & Events,50%,07-09-2018
Renovation,50%,07-09-2018
Enterprise Platforms and Products,20%,07-16-2018
Shop Book,40%,07-16-2018
Inline Pricing,60%,07-16-2018
Welcome,40%,07-16-2018
Connected Room,20%,07-16-2018
Guest Meetings & Events,30%,07-16-2018
Renovation,30%,07-16-2018
Enterprise Platforms and Products,50%,07-23-2018
Shop Book,90%,07-23-2018
Inline Pricing,60%,07-23-2018
Welcome,90%,07-23-2018
Connected Room,20%,07-23-2018
Guest Meetings & Events,50%,07-23-2018
Renovation,0%,07-23-2018
Enterprise Platforms and Products,10%,07-30-2018
Shop Book,0%,07-30-2018
Inline Pricing,10%,07-30-2018
Welcome,0%,07-30-2018
Connected Room,30%,07-30-2018
Guest Meetings & Events,10%,07-30-2018
Renovation,10%,07-30-2018
Enterprise Platforms and Products,20%,08-06-2018
Shop Book,80%,08-06-2018
Inline Pricing,40%,08-06-2018
Welcome,60%,08-06-2018
Connected Room,50%,08-06-2018
Guest Meetings & Events,10%,08-06-2018
Renovation,80%,08-06-2018
Enterprise Platforms and Products,40%,08-13-2018
Shop Book,80%,08-13-2018
Inline Pricing,90%,08-13-2018
Welcome,10%,08-13-2018
Connected Room,100%,08-13-2018
Guest Meetings & Events,100%,08-13-2018
Renovation,80%,08-13-2018
Enterprise Platforms and Products,50%,08-20-2018
Shop Book,0%,08-20-2018
Inline Pricing,100%,08-20-2018
Welcome,100%,08-20-2018
Connected Room,0%,08-20-2018
Guest Meetings & Events,100%,08-20-2018
Renovation,60%,08-20-2018
Enterprise Platforms and Products,30%,08-27-2018
Shop...
CSS
#container {
min-width: 310px;
max-width: 800px;
height: 400px;
margin: 0 auto
}
JavaScript
Highcharts.chart('container', {
data: {
csv: document.getElementById('csv').innerHTML
},
title: {
text: 'Solar Employment Growth by Sector, 2010-2016'
},
subtitle: {
text: 'Source: thesolarfoundation.com'
},
yAxis: {
title: {
text: 'Confidence'
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'middle'
},
plotOptions: {
series: {
label: {
connectorAllowed: false
},
pointStart: 2010
}
},
series: [{
name: 'Shop Book',
}],
responsive: {
rules: [{
condition: {
maxWidth: 500
},
chartOptions: {
legend: {
layout: 'horizontal',
align: 'center',
verticalAlign: 'bottom'
}
}
}]
}
});