Some data
Some data
by David O'Brien
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/data.js"></script>
<h1>Prequalifications</h1>
<p>Quick demo using Google Spreadsheets and Highcharts.js. <a href="https://docs.google.com/spreadsheets/d/1MgXE7bjr6PDDRubxmizGOl-PfYA6clbYsEGcEjoS0r8/edit?usp=sharing">View the spreadsheet</a>.</p>
<div id="containers">
<h2>Make it to Market</h2>
<div id="container"></div>
<div id="container2"></div>
<h2>By design</h2>
<div id="container3"></div>
<div id="container4"></div>
</div>
CSS
body {
padding: 20px;
font-family: Helvetica, Arial, sans-serif;
}
#containers div {
width: 98%;
min-height: 300px;
float: left;
margin: 0 1em 1em 0;
display: inline;
}
JavaScript
var sec = 1000; // 1sec
var min = sec * 60 // 1min
setTimeout(function(){
window.location.reload(1);
}, 2* min);
var highchartsOptions = Highcharts.setOptions(Highcharts.theme = {
colors: ['#058DC7', '#eaab1d']
});
Highcharts.setOptions({
chart: {
defaultSeriesType: 'line',
backgroundColor: '#fff',
shadow: true
}
});
// https://docs.google.com/spreadsheets/d/1MgXE7bjr6PDDRubxmizGOl-PfYA6clbYsEGcEjoS0r8/edit?usp=sharing
$('#container').highcharts({
data: {
googleSpreadsheetKey: '1MgXE7bjr6PDDRubxmizGOl-PfYA6clbYsEGcEjoS0r8',
googleSpreadsheetWorksheet: 1
},
title: {
text: 'MitM prequalifications'
},
series: [{
type: "column",
}],
yAxis: {
min: 1.5,
title: {
text: 'Prequalifications'
}
}
});
$('#container2').highcharts({
data: {
googleSpreadsheetKey: '1MgXE7bjr6PDDRubxmizGOl-PfYA6clbYsEGcEjoS0r8',
googleSpreadsheetWorksheet: 2
},
title: {
text: 'Total prequalifications'
},
yAxis: {
min: 1.5,
title: {
text: 'Total'
}
}
});
$('#container3').highcharts({
data: {
googleSpreadsheetKey: '1MgXE7bjr6PDDRubxmizGOl-PfYA6clbYsEGcEjoS0r8',
googleSpreadsheetWorksheet: 3
},
title: {
text: 'BD prequalifications'
},
series: [{
type: "column",
}],
yAxis: {
min: 1.5,
title: {
text: 'Prequalifications'
}
}
});
$('#container4').highcharts({
data: {
googleSpreadsheetKey: '1MgXE7bjr6PDDRubxmizGOl-PfYA6clbYsEGcEjoS0r8',
googleSpreadsheetWorksheet: 4
},
title: {
text: 'Total prequalifications'
},
yAxis: {
min: 1.5,
title: {
text: 'Total'
}
}
});
(function worker() {
$.ajax({
url: '//docs.google.com/spreadsheets/d/1MgXE7bjr6PDDRubxmizGOl-PfYA6clbYsEGcEjoS0r8/edit?usp=sharing',
success: function(data) {
...