var temp = [5.2,5.3,5.2,5,4.8,4.7,4.6,4.6,4.6,4.7,4.7,4.9,5]; var temptime = ['13.40','14.10','14.40','15.10','15.40','16.10','16.40','17.10','17.40','18.10','18.40','19.10','19.40']; var rain = [5,5,5,5,5,5.2,6.2,6.8,7.2,7.2,7.2,7.7,8.5]; var raintime = ['13.40','14.10','14.40','15.10','15.40','16.10','16.40','17.10','17.40','18.10','18.40','19.10','19.40']; var wind = [15,16,16,16,16,15,13,13,12,10,11,10,9]; var windtime = ['17.40','17.50','18.00','18.10','18.20','18.30','18.40','18.50','19.00','19.10','19.20','19.30','19.40']; var solar = [4,25,87,133,152,112,56,79,29,10,0,0,0]; var solartime = ['07.40','08.40','09.40','10.40','11.40','12.40','13.40','14.40','15.40','16.40','17.40','18.40','19.40']; var baro = [1007.5,1008.3,1008.8,1009.4,1009.6,1008.8,1008.3,1008,1007.5,1006.7,1005.8,1005.4,1004.6]; var barotime = ['07.40','08.40','09.40','10.40','11.40','12.40','13.40','14.40','15.40','16.40','17.40','18.40','19.40']; $(function() { $('.windd').sparkline([340,20], { type: 'pie', sliceColors: ['#5B7102','#ffffff'], offset: 64, chartRangeMin: 0, chartRangeMax: 360, borderWidth: 1, borderColor: '#ffffff', tooltipClassname: 'spark', tooltipPrefix:'Bearing: 144', tooltipSuffix: '°', tooltipFormat:'{{prefix}}{{y}}{{suffix}}', tooltipChartTitle: 'Avg. Wind Dir.' + '
' + ' Last 3 hours' }); }); $(function() { $('.temp').sparkline(temptime, { type: 'line', lineColor: '#5B7102', fillColor: '#5B7102', spotColor: '#5B7102', minSpotColor: '#5B7102', maxSpotColor: '#5B7102', numberFormatter: function(y) {return (('0000'+(y.toFixed(2))).slice (-5));}, width: 60, height:16, tooltipClassname: 'spark', tooltipPrefix: 'Time: ', tooltipFormat:'{{prefix}}{{y}}{{suffix}}', tooltipChartTitle: 'Temperature Today.' }); $('.temp').sparkline(temp, { composite: true, type: 'line', lineColor: '#ffffff', fillColor: '#5B7102', spotColor: '#ffffff', minSpotColor: '#55a9fd', maxSpotColor: '#f23434', tooltipClassname: 'spark', tooltipFormat:'{{prefix}}{{y}}{{suffix}}', tooltipPrefix: 'Temp: ', tooltipSuffix: " °C", width: 60, height:16 }); }); $(function() { $('.wind').sparkline(windtime, { type: 'line', lineColor: '#5B7102', fillColor: '#5B7102', spotColor: '#5B7102', minSpotColor: '#5B7102', maxSpotColor: '#5B7102', numberFormatter: function(y) {return (('0000'+(y.toFixed(2))).slice (-5));}, width: 60, height:16, tooltipClassname: 'spark', tooltipChartTitle: 'Wind Speed Today.', tooltipFormat:'{{prefix}}{{y}}{{suffix}}', tooltipPrefix: 'Time: ' }); $('.wind').sparkline(wind, { composite: true, type: 'line', lineColor: '#ffffff', fillColor: '#5B7102', spotColor: '#ffffff', minSpotColor: '#55a9fd', maxSpotColor: '#f23434', tooltipClassname: 'spark', tooltipFormat:'{{prefix}}{{y}}{{suffix}}', tooltipPrefix: 'Wind: ', tooltipSuffix: " kts", width: 60, height:16 }); }); $(function() { $('.rain').sparkline(raintime, { type: 'line', lineColor: '#5B7102', fillColor: '#5B7102', spotColor: '#5B7102', minSpotColor: '#5B7102', maxSpotColor: '#5B7102', numberFormatter: function(y) {return (('0000'+(y.toFixed(2))).slice (-5));}, width: 60, height:16, tooltipClassname: 'spark', tooltipPrefix: 'Time: ', tooltipFormat:'{{prefix}}{{y}}{{suffix}}', tooltipChartTitle: 'Rainfall Today.' }); $('.rain').sparkline(rain, { composite: true, type: 'line', lineColor: '#ffffff', fillColor: '#5B7102', spotColor: '#ffffff', minSpotColor: '#55a9fd', maxSpotColor: '#f23434', tooltipClassname: 'spark', tooltipFormat:'{{prefix}}{{y}}{{suffix}}', tooltipPrefix: 'Rain: ', tooltipSuffix: " mm", width: 60, height:16 }); }); $(function() { $('.solar').sparkline(solartime, { type: 'line', lineColor: '#5B7102', fillColor: '#5B7102', spotColor: '#5B7102', minSpotColor: '#5B7102', maxSpotColor: '#5B7102', numberFormatter: function(y) {return (('0000'+(y.toFixed(2))).slice (-5));}, width: 60, height:16, tooltipClassname: 'spark', tooltipChartTitle: 'Solar Today.', tooltipFormat:'{{prefix}}{{y}}{{suffix}}', tooltipPrefix: 'Time: ' }); $('.solar').sparkline(solar, { composite: true, type: 'line', lineColor: '#ffffff', fillColor: '#5B7102', spotColor: '#ffffff', minSpotColor: '#55a9fd', maxSpotColor: '#f23434', tooltipClassname: 'spark', tooltipFormat:'{{prefix}}{{y}}{{suffix}}', tooltipPrefix: 'Sun: ', tooltipSuffix: " w/m²", width: 60, height:16 }); }); $(function() { $('.baro').sparkline(barotime, { type: 'line', lineColor: '#5B7102', fillColor: '#5B7102', spotColor: '#5B7102', minSpotColor: '#5B7102', maxSpotColor: '#5B7102', numberFormatter: function(y) {return (('0000'+(y.toFixed(2))).slice (-5));}, width: 60, height:16, tooltipClassname: 'spark', tooltipChartTitle: 'Barometer Today.', tooltipFormat:'{{prefix}}{{y}}{{suffix}}', tooltipPrefix: 'Time: ' }); $('.baro').sparkline(baro, { composite: true, type: 'line', lineColor: '#ffffff', fillColor: '#5B7102', spotColor: '#ffffff', minSpotColor: '#55a9fd', maxSpotColor: '#f23434', numberDigitGroupCount: 6, tooltipClassname: 'spark', tooltipFormat:'{{prefix}}{{y}}{{suffix}}', tooltipPrefix: 'Baro: ', tooltipSuffix: " mb", width: 60, height:16 }); });