$(document).ready(function() { $.getJSON('https://s3-eu-west-1.amazonaws.com/chrisramsay-weather-data/updown_rates.json', function(json) { chart = new Highcharts.StockChart({ chart: { renderTo: 'updown_rates', type: 'spline', marginRight: 130, marginBottom: 80, zoomType: 'x' }, tooltip: { backgroundColor: { linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 }, stops: [ [0, 'white'], [1, '#EEE'] ] }, borderColor: 'gray', borderWidth: 1, valueSuffix: ' bits/s' }, rangeSelector: { selected: 0, buttons: [{ type: 'day', count: 1, text: '1d' }, { type: 'day', count: 3, text: '3d' }, { type: 'week', count: 1, text: '1w' }, { type: 'month', count: 1, text: '1m' }, { type: 'month', count: 3, text: '3m' }] }, xAxis: { type: 'datetime', labels: { rotation: -45 }, }, yAxis: { title: { text: "Data Transfer (bits/s)" }, min: 0, plotLines: [{ // zero plane value: 0, color: '#808080', width: 1, zIndex: 2 }], }, legend: { enabled: true, itemDistance: 50 }, series: [{ name: 'Download', data: json.download, color: '#ffdb4d' }, { name: 'Upload', data: json.upload, color: '#668cff' }], credits: { text: 'Updated: ' + json.datemark + ', Data: ' + json.datasize, position: { align: 'left', y: -5, x: 5 }, style: { fontSize: '8pt' } }, }); }); });