Waltham Pet Care
by Ben Clayton
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
JavaScript
// Data retrieved from http://vikjavev.no/ver/index.php?spenn=2d&sluttid=16.06.2015.
$(function() {
$('#container').highcharts({
chart: {
type: 'spline',
events: {
load: function() {
debugger;
var serie = {
name: "99.5th Pencentile",
data: []
}
for (var x = 0; x < 13; x++) {
serie.data.push(x)
}
this.series.push(serie);
}
}
},
title: {
text: 'Puppy growth Chart'
},
legend: {
enabled: false
},
subtitle: {
text: ''
},
xAxis: {
categories: ['0-6', '10', '15', '20', '25', '30', '35', '40', '45', '50', '55', '60', '65'],
majorGridLineWidth: 1,
minorGridLineWidth: 1,
minTickInterval: 1,
gridLineWidth: 1,
title: {
text: "Age in Weeks"
},
labels: {
align: "left",
x: -30
}
},
yAxis: {
title: {
text: 'Weight in kg'
},
min: 0,
max: 18,
minorGridLineWidth: 1,
gridLineWidth: 1,
alternateGridColor: null,
},
plotOptions: {
spline: {
lineWidth: 2,
states: {
hover: {
lineWidth: 5
}
},
marker: {
enabled: false
}
}
},
series: [{
name: 'Age in Weeks',
data: [null, 6, 8.8, 11.3, 13.2, 14.4, 15.2, 15.75, 16.1, 16.3, 16.45, 16.5, 16.5]
}]
});
});